jonesor / compadreDB

Code and data for the COMPADRE Plant Matrix Database and COMADRE Animal Matrix Database
GNU General Public License v2.0
35 stars 20 forks source link

Failed script Plot_LifeCycle_Diagram.R #3

Closed Lobz closed 7 years ago

Lobz commented 7 years ago

I'm trying these scripts but can't make this one work. After I execute the last command I get a warning:

Warning message:
In sample.int(x, size, replace, prob) :
  '.Random.seed' is not an integer vector but of type 'NULL', so ignored

And it opens a browser window with this stack:

abort(0) at jsStackTrace@file:///tmp/Rtmp8kUDC7/viewhtml17e655528a/lib/viz-0.3/viz.js:5:22063
stackTrace@file:///tmp/Rtmp8kUDC7/viewhtml17e655528a/lib/viz-0.3/viz.js:5:22246
abort@file:///tmp/Rtmp8kUDC7/viewhtml17e655528a/lib/viz-0.3/viz.js:28:10646
nullFunc_iii@file:///tmp/Rtmp8kUDC7/viewhtml17e655528a/lib/viz-0.3/viz.js:5:662060
a8@file:///tmp/Rtmp8kUDC7/viewhtml17e655528a/lib/viz-0.3/viz.js:21:31632
iC@file:///tmp/Rtmp8kUDC7/viewhtml17e655528a/lib/viz-0.3/viz.js:9:83337
aD@file:///tmp/Rtmp8kUDC7/viewhtml17e655528a/lib/viz-0.3/viz.js:9:102096
uF@file:///tmp/Rtmp8kUDC7/viewhtml17e655528a/lib/viz-0.3/viz.js:9:173803
pG@file:///tmp/Rtmp8kUDC7/viewhtml17e655528a/lib/viz-0.3/viz.js:9:204482
xc@file:///tmp/Rtmp8kUDC7/viewhtml17e655528a/lib/viz-0.3/viz.js:11:738
@file:///tmp/Rtmp8kUDC7/viewhtml17e655528a/lib/viz-0.3/viz.js:28:372
ccallFunc@file:///tmp/Rtmp8kUDC7/viewhtml17e655528a/lib/viz-0.3/viz.js:5:8392
Viz@file:///tmp/Rtmp8kUDC7/viewhtml17e655528a/lib/viz-0.3/viz.js:47:25
.renderValue@file:///tmp/Rtmp8kUDC7/viewhtml17e655528a/lib/grViz-binding-0.9.0/grViz.js:38:24
window.HTMLWidgets.staticRender/</<@file:///tmp/Rtmp8kUDC7/viewhtml17e655528a/lib/htmlwidgets-0.8/htmlwidgets.js:625:11
forEach@file:///tmp/Rtmp8kUDC7/viewhtml17e655528a/lib/htmlwidgets-0.8/htmlwidgets.js:55:7
window.HTMLWidgets.staticRender/<@file:///tmp/Rtmp8kUDC7/viewhtml17e655528a/lib/htmlwidgets-0.8/htmlwidgets.js:551:7
forEach@file:///tmp/Rtmp8kUDC7/viewhtml17e655528a/lib/htmlwidgets-0.8/htmlwidgets.js:55:7
window.HTMLWidgets.staticRender@file:///tmp/Rtmp8kUDC7/viewhtml17e655528a/lib/htmlwidgets-0.8/htmlwidgets.js:549:5
@file:///tmp/Rtmp8kUDC7/viewhtml17e655528a/lib/htmlwidgets-0.8/htmlwidgets.js:638:7

Anyne has any idea what that might mean?

atyre2 commented 7 years ago

The script Plot_Lifecycle_diagram.R runs for me starting with a clean workspace and no other packages loaded; see sessionInfo() below for details of the machine it works on.

R version 3.3.2 (2016-10-31) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows >= 8 x64 (build 9200)

locale: [1] LC_COLLATE=English_United States.1252 [2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 [4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252

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

other attached packages: [1] DiagrammeR_0.8.2

loaded via a namespace (and not attached): [1] Rcpp_0.12.9 visNetwork_1.0.0 [3] digest_0.6.11 rprojroot_1.1
[5] plyr_1.8.4 jsonlite_1.2
[7] backports_1.0.4 magrittr_1.5
[9] scales_0.4.1 stringi_1.1.2
[11] rstudioapi_0.5 tools_3.3.2
[13] stringr_1.1.0 htmlwidgets_0.5 [15] munsell_0.4.2 yaml_2.1.14
[17] colorspace_1.2-6 htmltools_0.3.5

Lobz commented 7 years ago

Hm, we seem to use different versions of DiagrammeR. Could that be the problem? Maybe I can install an older version of DiagrammeR o.o

R version 3.3.2 (2016-10-31)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Arch Linux

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C
 [9] LC_ADDRESS=C               LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

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

other attached packages:
[1] DiagrammeR_0.9.0 devtools_1.10.0

loaded via a namespace (and not attached):
 [1] igraph_1.0.1       Rcpp_0.12.3        rstudioapi_0.6     magrittr_1.5

 [5] munsell_0.4.2      colorspace_1.2-6   R6_2.1.2           brew_1.0-6

 [9] stringr_1.1.0      plyr_1.8.3         dplyr_0.5.0        visNetwork_1.0.2
[13] Rook_1.1-1         tools_3.3.2        grid_3.3.2         gtable_0.1.2

[17] DBI_0.5-1          influenceR_0.1.0   htmltools_0.3.5    yaml_2.1.13

[21] digest_0.6.8       assertthat_0.1     tibble_1.2         gridExtra_2.0.0
[25] RColorBrewer_1.1-2 ggplot2_2.0.0      htmlwidgets_0.8    viridis_0.3.4
[29] memoise_0.2.1      rgexf_0.15.3       stringi_1.1.2      scales_0.4.1

[33] XML_3.98-1.5       jsonlite_0.9.19
atyre2 commented 7 years ago

I just updated DiagrammeR to the new version and it still runs on a different computer. I checked the list of packages and this computer has more recent versions of these: gridextra yaml ggplot2 gtable digest jsonlite visNetwork Munsell Colorspace R6

You had a more recent version of Rcpp, but updating that made no difference on my computer. I used package versions (see this: http://stackoverflow.com/questions/17082341/installing-older-version-of-r-package) to install the same version of visNetwork, but again it worked fine.

And just in case, are you running the script Plot_LifeCycle_Diagram.R from the scripts folder exactly as it is in the repository?

Lobz commented 7 years ago

I installed version 0.8.2 of DiagrammeR using load_all() and tried again, but now I get this different error:

Error in dirname(to) : a character vector argument expected 
In addition: Warning message: 
In file(con, "r") : file("") only supports open = "w+" and open = "w+b": using the former

I'm still lost o.o

atyre2 commented 7 years ago

Well, sorry, but if I can't reproduce the error it is pretty much impossible to help you figure it out.

Lobz commented 7 years ago

I'm running the script from the Scripts folder and also from the root of the repository, but loading the database manually. But I realize we're working on completely different operating systems, and I'm coming to the conclusion that this is most likely a problem with Viz, probably related to my version of javascript. Thank-you for the effort.

jonesor commented 7 years ago

Closing this issue now, since it looks like it has been resolved one way or another. Please raise another issue if you need to!