mtennekes / treemap

R package for treemap visualisation
64 stars 24 forks source link

GitHub version doesn't install on shinyapps #23

Closed ellisp closed 9 years ago

ellisp commented 9 years ago

Not sure whether to report this here or for shinyapps but I think it's something about the {treemap} package that is problematic. To demonstrate the problem, I added the line library(treemap) and nothing else to one of the basic shiny examples. The code below shows that it deploys to shinyapps fine when I have the CRAN version of treemap on my system, but not when I have the GitHub version. shinyapps works by mimicking your local install on RStudio's shiny server, so this shows that the problem is that it can't build the GitHub version of {treemap} for some reason.

This particularly causes the user problems just at the moment because the GitHub version of {treemap} is needed for {d3treeR} to work.

library(shiny)
library(shinyapps)
library(devtools)

install.packages("treemap") # ie from cran
# this works fine:
deployApp("C:/Users/Peter Ellis/Documents/R/win-library/3.1/shiny/examples/01_hello", account = "ellisp")

install_github("mtennekes/treemap/pkg") # ie from GitHub, dev version
runApp("C:/Users/Peter Ellis/Documents/R/win-library/3.1/shiny/examples/01_hello") # still works locally
# but this no longer works:
deployApp("C:/Users/Peter Ellis/Documents/R/win-library/3.1/shiny/examples/01_hello", account = "ellisp")

Which returns:

Error: Unhandled Exception: Child Task 73069206 failed: Error building image: Error building treemap (2.3). Build exited with non-zero status: 1

> sessionInfo()
R version 3.1.2 (2014-10-31)
Platform: x86_64-w64-mingw32/x64 (64-bit)

locale:
[1] LC_COLLATE=English_New Zealand.1252  LC_CTYPE=English_New Zealand.1252    LC_MONETARY=English_New Zealand.1252 LC_NUMERIC=C                        
[5] LC_TIME=English_New Zealand.1252    

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

other attached packages:
[1] treemap_2.3      shiny_0.12.2     devtools_1.8.0   shinyapps_0.3.63

loaded via a namespace (and not attached):
 [1] bitops_1.0-6       Cairo_1.5-6        chron_2.3-47       colorspace_1.2-6   curl_0.9           data.table_1.9.4   digest_0.6.8       ggplot2_1.0.1     
 [9] git2r_0.10.1       grid_3.1.2         gridBase_0.4-7     gtable_0.1.2       htmltools_0.2.6    httpuv_1.3.3       httr_1.0.0         igraph_1.0.1      
[17] jsonlite_0.9.16    magrittr_1.5       MASS_7.3-42        memoise_0.2.1      mime_0.3           munsell_0.4.2      plyr_1.8.3         proto_0.3-10      
[25] R6_2.1.1           RColorBrewer_1.1-2 Rcpp_0.12.0        RCurl_1.95-4.7     reshape2_1.4.1     RJSONIO_1.3-0      rversions_1.0.1    scales_0.3.0      
[33] stringi_0.5-5      stringr_1.0.0      tools_3.1.2        xml2_0.1.1         xtable_1.7-4      
mtennekes commented 9 years ago

I have no experience with shinyapps. It seems like deployApp runs the app from a server. I can imagine that this server uses the cran versions of the dependent packages. Maybe this causes consistency problems with the locally installed package versions.

ellisp commented 9 years ago

Thanks. I'll follow up with the shinyapps google group; my understanding is that it should be robust to this situation, but the fact that it installs locally but not on the server suggests something's going wrong. Am I right in thinking that you can't upgrade the CRAN version until some of your dependencies are upgraded there?

All this highlights an interesting strategic risk of incompatible R package ecosystems. But in this case perhaps it is just a temporary glitch.