0
votes

I am facing a problem that you might already have seen : I am trying to create a Shiny app using dygraphs. But, for the first time, when I call the library(dygraphs), in my ui.R file, I get an error :

ERROR: there is no package called ‘dygraphs’

I checked whether it was correctly installed on my server : installed.packages() gives me the line :

            OS_type MD5sum NeedsCompilation Built
dygraphs    NA      NA     "no"             "3.2.1"

require(dygraphs) gives me :

Loading required package: dygraphs

I have the same version of R on my computer and my server, which is :

R version 3.2.1 (2015-06-18) -- "World-Famous Astronaut"

And, the weirdest thing : my code works on my computer (with runApp() on Rstudio), but not on my server.

If anyone know how to cope with this problem... Thanks a bunch !

1

1 Answers

0
votes

I found the solution, it's possible to see the dependencies of a package with CRAN : https://cran.r-project.org/web/packages/dygraphs/index.html

And eventually, the following line does the trick !

install.packages(c("htmlwidgets","xts","zoo","rmarkdown","yaml","dygraphs"),lib="/usr/local/lib/R/site-library",dependencies=TRUE)

Enjoy :)