ConsBiol-unibern / SDMtune

Performs Variables selection and model tuning for Species Distribution Models (SDMs). It provides also several utilities to display results.
https://consbiol-unibern.github.io/SDMtune/
Other
25 stars 8 forks source link

[Bug]: HTML file output from modelReport does not bring up photos #31

Open owenssam1 opened 1 year ago

owenssam1 commented 1 year ago

Describe the bug

Photos of graphs will not come up if the folder containing the model is moved from its original location. In the HTML file, I will click a photo of a graph and it will pop up saying "ERR_FILE_NOT_FOUND" only after moving the directory containing the graphs.

Steps to reproduce the bug

library(SDMtune)

modelReport(
  model = object_model,
  folder = "folder",
  test = object_test,
  type = "cloglog", # default output type
  response_curves = TRUE,
  jk = TRUE,
  verbose = TRUE
  )

Session information

R version 4.2.3 (2023-03-15 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19045)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.utf8  LC_CTYPE=English_United States.utf8    LC_MONETARY=English_United States.utf8
[4] LC_NUMERIC=C                           LC_TIME=English_United States.utf8    

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

other attached packages:
 [1] terra_1.7-46     sf_1.0-14        plotROC_2.3.0    kableExtra_1.3.4 dismo_1.3-14     raster_3.6-23    sp_2.0-0         ENMeval_2.0.4   
 [9] magrittr_2.0.3   rJava_1.0-6      devtools_2.4.5   usethis_2.2.2    here_1.0.1       lubridate_1.9.2  forcats_1.0.0    stringr_1.5.0   
[17] dplyr_1.1.2      purrr_1.0.2      readr_2.1.4      tidyr_1.3.0      tibble_3.2.1     ggplot2_3.4.3    tidyverse_2.0.0  SDMtune_1.3.1   

loaded via a namespace (and not attached):
 [1] fs_1.6.3           webshot_0.5.5      httr_1.4.7         rprojroot_2.0.3    bslib_0.5.1        tools_4.2.3        profvis_0.3.8     
 [8] utf8_1.2.3         R6_2.5.1           KernSmooth_2.23-20 DBI_1.1.3          colorspace_2.1-0   urlchecker_1.0.1   withr_2.5.0       
[15] tidyselect_1.2.0   prettyunits_1.1.1  processx_3.8.2     compiler_4.2.3     textshaping_0.3.6  cli_3.6.1          rvest_1.0.3       
[22] xml2_1.3.5         labeling_0.4.3     sass_0.4.7         scales_1.2.1       classInt_0.4-10    proxy_0.4-27       callr_3.7.3       
[29] systemfonts_1.0.4  digest_0.6.33      rmarkdown_2.25     svglite_2.1.1      pkgconfig_2.0.3    htmltools_0.5.5    sessioninfo_1.2.2 
[36] highr_0.10         fastmap_1.1.1      htmlwidgets_1.6.2  rlang_1.1.1        rstudioapi_0.15.0  shiny_1.7.5        farver_2.1.1      
[43] jquerylib_0.1.4    generics_0.1.3     jsonlite_1.8.7     Rcpp_1.0.11        munsell_0.5.0      fansi_1.0.4        lifecycle_1.0.3   
[50] stringi_1.7.12     yaml_2.3.7         plyr_1.8.8         pkgbuild_1.4.2     grid_4.2.3         promises_1.2.1     crayon_1.5.2      
[57] miniUI_0.1.1.1     lattice_0.20-45    hms_1.1.3          knitr_1.44         ps_1.7.5           pillar_1.9.0       codetools_0.2-19  
[64] pkgload_1.3.2.1    glue_1.6.2         evaluate_0.21      remotes_2.4.2.1    vctrs_0.6.3        tzdb_0.4.0         httpuv_1.6.11     
[71] foreach_1.5.2      gtable_0.3.4       cachem_1.0.8       xfun_0.39          mime_0.12          xtable_1.8-4       e1071_1.7-13      
[78] later_1.3.1        ragg_1.2.5         class_7.3-21       viridisLite_0.4.2  iterators_1.0.14   memoise_2.0.1      units_0.8-4       
[85] timechange_0.2.0   ellipsis_0.3.2

Additional information

No response

Reproducible example