milos-agathon / making-crisp-spike-maps-with-r

Join me in today's tutorial as we embark on another R quest to make a crisp spike population map using the Kontur dataset.
10 stars 5 forks source link

Versions of required libraries #1

Closed michalskop closed 1 year ago

michalskop commented 1 year ago

I tried to replicate the script with new install of the packages, wowever it seems to me that some of the packages are too new and it would require downgrading some of them, It would be good to have a list of the required packages also with their versions that work for this script so the one knows what to downgrade and to which version.

My trial and outputs: I made a new upgrade of R and the required packages. I tried to replicate the script (changing DE for SK) and it went ok until

  1. # Create the initial 3D object (lines 126-141)
    Warning messages:
    1: 'rgl.surface' is deprecated.
    Use 'surface3d' instead.
    See help("Deprecated") 
    2: 'rgl.viewpoint' is deprecated.
    Use 'view3d' instead.
    See help("Deprecated") 
    3: In par3d(windowRect = windowsize, ...) :
    parameter "shadow_darkness" cannot be set
    4: 'rgl.triangles' is deprecated.
    Use 'triangles3d' instead.
    See help("Deprecated") 

so no new 3D map was shown in the Plots tab of R-studio (the previous 2 maps were shown ok)

  1. # Use this to adjust the view after building the window object (lines 143-144)
    Warning message:
    'rgl::rgl.viewpoint' is deprecated.
    Use 'view3d' instead.
    See help("Deprecated") 
  2. rayshader::render_highquality( (lines 146-155)
    Error in rayrender::obj_model(cache_filename, x = -bbox_center[1], y = -bbox_center[2],  : 
    unused argument (texture = TRUE)

    and no PNG picture is created.

milos-agathon commented 1 year ago

Thank you for your feedback and for sharing your experience in replicating the script! I apologize for the inconvenience you encountered due to deprecated functions and compatibility issues with newer package versions. I understand the importance of having a clear list of required packages and their compatible versions.

Below is the printout of my session when running the script. Let me know if this helps!

> sessionInfo()
R version 4.1.0 (2021-05-18)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 22621)

Matrix products: default

locale:
[1] LC_COLLATE=English_Netherlands.1252  LC_CTYPE=English_Netherlands.1252   
[3] LC_MONETARY=English_Netherlands.1252 LC_NUMERIC=C
[5] LC_TIME=English_Netherlands.1252    

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

other attached packages:
 [1] rayshader_0.35.1  stars_0.5-5       abind_1.4-5       httr_1.4.2       
 [5] R.utils_2.10.1    R.oo_1.24.0       R.methodsS3_1.8.1 classInt_0.4-3   
 [9] giscoR_0.3.1      sf_1.0-12         forcats_0.5.1     stringr_1.5.0    
[13] dplyr_1.0.7       purrr_0.3.4       readr_2.0.0       tidyr_1.1.3
[17] tibble_3.1.7      ggplot2_3.3.5     tidyverse_1.3.1   rgho_3.0.0

loaded via a namespace (and not attached):
 [1] fs_1.5.0           lubridate_1.7.10   doParallel_1.0.17  progress_1.2.2
 [5] tools_4.1.0        backports_1.2.1    utf8_1.2.2         R6_2.5.1
 [9] KernSmooth_2.23-20 DBI_1.1.2          colorspace_2.0-3   withr_2.5.0
[13] tidyselect_1.2.0   prettyunits_1.1.1  curl_4.3.2         compiler_4.1.0
[17] extrafontdb_1.0    cli_3.2.0          rvest_1.0.1        geojsonsf_2.0.1
[21] xml2_1.3.2         labeling_0.4.2     scales_1.2.1       proxy_0.4-26      
[25] rappdirs_0.3.3     digest_0.6.29      base64enc_0.1-3    ODataQuery_0.5.3
[29] pkgconfig_2.0.3    htmltools_0.5.4    extrafont_0.17     dbplyr_2.1.1
[33] fastmap_1.1.0      htmlwidgets_1.6.1  rlang_1.0.6        readxl_1.3.1
[37] rstudioapi_0.13    farver_2.1.1       generics_0.1.0     jsonlite_1.8.0
[41] magrittr_2.0.3     s2_1.1.2           Rcpp_1.0.8.3       munsell_0.5.0
[45] fansi_1.0.3        lifecycle_1.0.3    stringi_1.7.6      parallel_4.1.0
[49] crayon_1.5.2       haven_2.4.1        hms_1.1.2          knitr_1.41
[53] pillar_1.9.0       codetools_0.2-18   wk_0.6.0           reprex_2.0.0
[57] glue_1.6.2         modelr_0.1.8       vctrs_0.5.1        tzdb_0.1.2        
[61] foreach_1.5.2      Rttf2pt1_1.3.9     cellranger_1.1.0   gtable_0.3.1
[65] assertthat_0.2.1   xfun_0.36          lwgeom_0.2-8       broom_0.7.8
[69] e1071_1.7-9        class_7.3-19       iterators_1.0.14   units_0.8-0
[73] rgl_1.1.13         ellipsis_0.3.2