Error in library(dplyr) : there is no package called ‘dplyr’

4,341 views
Skip to first unread message

Bodong Chen

unread,
Oct 27, 2015, 1:02:06 AM10/27/15
to ShinyApps Users
Hi,

I was trying to deploy an app to Shinyapps.io.  The deployment went through but the webpage failed to load because of an issue related to dplyr (see below).  I searched posts in this group, re-installed dplyr locally, and made sure library(dplyr) was called in my code. However, this issue is still there. It would be greatly appreciated if you could give me some tips. Thank you.

Below is the error log:

2015-10-27T04:47:05.915573+00:00 shinyapps[66195]: Using jsonlite for JSON processing
2015-10-27T04:47:05.918863+00:00 shinyapps[66195]: 
2015-10-27T04:47:05.918865+00:00 shinyapps[66195]: Starting R with process ID: '11'
2015-10-27T04:47:05.924230+00:00 shinyapps[66195]: Error in library(dplyr) : there is no package called ‘dplyr’
2015-10-27T04:47:05.924232+00:00 shinyapps[66195]: Calls: local ... sourceUTF8 -> source -> withVisible -> eval -> eval -> library
2015-10-27T04:47:05.924963+00:00 shinyapps[66195]: Execution halted

Here is my R sessionInfo:

> sessionInfo()
R version 3.1.3 (2015-03-09)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.10.5 (Yosemite)

locale:
[1] en_CA.UTF-8/en_CA.UTF-8/en_CA.UTF-8/C/en_CA.UTF-8/en_CA.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] dplyr_0.4.3.9000 devtools_1.9.1  

loaded via a namespace (and not attached):
 [1] assertthat_0.1    bitops_1.0-6      curl_0.9.3        DBI_0.3.1        
 [5] digest_0.6.8      httr_1.0.0        knitr_1.10.5      magrittr_1.5     
 [9] memoise_0.2.1     parallel_3.1.3    R6_2.1.1          Rcpp_0.12.1      
[13] RCurl_1.95-4.7    RJSONIO_1.3-0     rsconnect_0.4.1.7 stringi_0.5-5    
[17] stringr_1.0.0     tools_3.1.3      

Andy Kipp

unread,
Oct 27, 2015, 9:31:09 AM10/27/15
to Bodong Chen, ShinyApps Users
Are you publishing from using the IDE button or are you using the shinyapps package?

Can you send over the output from:

rsconnect::appDependencies('path/to/your/app')



--
You received this message because you are subscribed to the Google Groups "ShinyApps Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shinyapps-use...@googlegroups.com.
To post to this group, send email to shinyap...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/shinyapps-users/78d00c34-4378-4299-9d74-c91c10ac9dce%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Bodong Chen

unread,
Oct 27, 2015, 11:24:42 AM10/27/15
to ShinyApps Users, bodon...@gmail.com
Hi Andy,

I tried both, which returned the same results. When deploying using the package, I ran the following:

> library(shinyapps)
> rsconnect::deployApp()

Below are the results of appDependencies. No appearance of dplyr, so are other packages like googlesheets. Wondering whether I did anything wrong. Any tips will be appreciated.

> rsconnect::appDependencies()
     package version source
1         R6   2.1.1   CRAN
2       Rcpp  0.12.1   CRAN
3     digest   0.6.8   CRAN
4  htmltools   0.2.6   CRAN
5     httpuv   1.3.3   CRAN
6   jsonlite  0.9.17   CRAN
7       mime     0.4   CRAN
8    packrat   0.4.5   CRAN
9      shiny  0.12.2   CRAN
10    xtable   1.7-4   CRAN

Andy Kipp

unread,
Oct 27, 2015, 11:53:11 AM10/27/15
to Bodong Chen, ShinyApps Users
Do you use packrat to manage package dependencies? 

Can you try removing the packrat directory from your application folder and re-running appDependencies()?

Bodong Chen

unread,
Oct 27, 2015, 11:58:29 AM10/27/15
to Andy Kipp, ShinyApps Users
I was not using Packrat and double-checked in RStudio that the project is not using Packrat. Any other thoughts?

Andy Kipp

unread,
Oct 27, 2015, 12:22:33 PM10/27/15
to Bodong Chen, ShinyApps Users
Did you try deleting that directory?

Andy Kipp

unread,
Oct 27, 2015, 12:32:12 PM10/27/15
to Bodong Chen, ShinyApps Users
Also what version of packrat do you have? Can you make sure its the latest and you've restarted R?

Bodong Chen

unread,
Oct 27, 2015, 12:46:34 PM10/27/15
to ShinyApps Users, bodon...@gmail.com
I guess I don't understand what you meant by "deleting that directory". Sorry I am not familiar with Packrat at all. There is no related directory under the project. I did try to remove the rsconnect folder. 

> packrat::snapshot()
Error: This project has not yet been packified.
Run 'packrat::init()' to init packrat.

I also updated Packrat and restarted R. Same results.  Thanks much for helping out. 

Andy Kipp

unread,
Oct 27, 2015, 3:39:26 PM10/27/15
to Bodong Chen, ShinyApps Users
So I downloaded your source code and ran rsconnect::appDependencies() and I got the correct output:

> rsconnect::appDependencies()
        package  version source
1            BH 1.58.0-1   CRAN
2           DBI    0.3.1   CRAN
3          MASS   7.3-43   CRAN
4           NLP    0.1-8   CRAN
5            R6    2.1.1   CRAN
6  RColorBrewer    1.1-2   CRAN
7          Rcpp   0.12.1   CRAN
8           XML 3.98-1.3   CRAN
9    assertthat      0.1   CRAN
10   cellranger    1.0.0   CRAN
11   colorspace    1.2-6   CRAN
12         curl    0.9.3   CRAN
13    dichromat    2.0-0   CRAN
14       digest    0.6.8   CRAN
15        dplyr    0.4.3   CRAN
16      ggplot2    1.0.1   CRAN
17 googlesheets    0.1.0   CRAN
18       gtable    0.1.2   CRAN
19    htmltools    0.2.6   CRAN
20  htmlwidgets      0.5   CRAN
21       httpuv    1.3.3   CRAN
22         httr    1.0.0   CRAN
23     jsonlite   0.9.17   CRAN
24     labeling      0.3   CRAN
25     lazyeval   0.1.10   CRAN
26     magrittr      1.5   CRAN
27      memoise    0.2.1   CRAN
28         mime      0.4   CRAN
29      munsell    0.4.2   CRAN
30    networkD3    0.2.6   CRAN
31      packrat    0.4.5   CRAN
32         plyr    1.8.3   CRAN
33        proto   0.3-10   CRAN
34   rWordCloud      0.1 github
35     reshape2    1.4.1   CRAN
36       scales    0.3.0   CRAN
37        shiny   0.12.2   CRAN
38  shinythemes    1.0.1   CRAN
39         slam   0.1-32   CRAN
40      stringi    0.5-5   CRAN
41      stringr    1.0.0   CRAN
42        tidyr    0.3.1   CRAN
43           tm    0.6-2   CRAN
44         xml2    0.1.2   CRAN
45       xtable    1.7-4   CRAN
46         yaml   2.1.13   CRAN

The only difference I can tell is that I am running R 3.2.2.

Bodong Chen

unread,
Oct 27, 2015, 5:37:02 PM10/27/15
to Andy Kipp, ShinyApps Users
I upgraded R and the issue went away!! Thanks a lot for your help.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages