Question

I started playing with OpenCPU a couple of weeks back and am getting hooked to it. I was able to succesfully install the "knitr" and "opencpu.demo" apps. The issue I am running into is when I try to invoke the R functions I packaged under a new r package and call it from within knitr-app. I get a message saying no such package exists. I ran installed.packages(lib.loc="/usr/lib/R/library") from an R shell and from knitr-app interface and indeed my packages shows up in the former but not in the latter case. No idea whats going on here ! Will greatly appreciate if anyone can answer this.

omments: when i run find.package("DummyPkg") through the /R/pub/base/identity/json API , I do get back

[
    "/usr/lib/R/library/DummyPkg"
]

However the same query from within knitr-app webpage returns:

# write R code here

find.package("DummyPkg")

## Error: there is no package called 'DummyPkg'
Was it helpful?

Solution

The default html page for knitr app has links to opencpu.org server, so the POST was going to public server instead of going to my server, no wonder my packages weren't showing up !

Comments: when i run find.package("DummyPkg") through the /R/pub/base/identity/json API , I do get back [ "/usr/lib/R/library/DummyPkg" ]

However the same query from within knitr-app webpage returns:

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top