Comments (7)
Hi, thank you for reporting the issue.
Can you provide a script to reproduce the error?
from sdmtune.
It happens after I try to get a model report for any model, with any set of options I choose (and I've tried a bunch of combinations). This includes using the data and the example from your package, so I'm not sure recreating your own code here will be helpful. It seems like this must be some kind of package compatibility problem. I guess it should be said I don't always get the "n addition: Warning message: In matrix(as.numeric(d)) : NAs introduced by coercion" but the "File ./plots/ROC_curve.png not found in resource path Error: pandoc document conversion failed with error 99" happens for any and all uses of the modelReport function.
from sdmtune.
Ok, I'll have a look at it in the following days.
Could you please post the output of sessionInfo()
?
from sdmtune.
Here it is:
R version 4.0.3 (2020-10-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19043)
Matrix products: default
locale:
[1] LC_COLLATE=English_Canada.1252 LC_CTYPE=English_Canada.1252 LC_MONETARY=English_Canada.1252 LC_NUMERIC=C
[5] LC_TIME=English_Canada.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] oceanmap_0.1.1 extrafont_0.17 mapdata_2.3.0 OceanView_1.0.6 plot3Drgl_1.0.2 rgl_0.108.3 plot3D_1.4
[8] crsuggest_0.3.1 viridis_0.6.2 viridisLite_0.4.0 cowplot_1.1.1 ggplot2_3.3.5 maps_3.4.0 knitr_1.37
[15] kableExtra_1.3.4 enmSdm_0.5.1.7 dismo_1.3-5 SDMtune_1.1.5 tidync_0.2.4 raster_3.5-15 sp_1.4-6
[22] RNetCDF_2.5-2 ncdf4_1.19 lattice_0.20-41 RColorBrewer_1.1-2 chron_2.3-56
loaded via a namespace (and not attached):
[1] SparseM_1.81 ModelMetrics_1.2.2.2 earth_5.3.1 tidyr_1.2.0 nabor_0.5.0 multcomp_1.4-18
[7] data.table_1.14.2 rpart_4.1-15 doParallel_1.0.17 generics_0.1.2 leaflet_2.0.4.1 terra_1.5-17
[13] TH.data_1.1-0 polspline_1.1.19 proxy_0.4-26 future_1.23.0 ecodist_2.0.7 adehabitatMA_0.3.14
[19] webshot_0.5.2 xml2_1.3.3 lubridate_1.8.0 adehabitatLT_0.3.25 assertthat_0.2.1 gower_1.0.0
[25] xfun_0.29 hms_1.1.1 jquerylib_0.1.4 rJava_1.0-6 satellite_1.0.4 adehabitatHR_0.4.19
[31] evaluate_0.14 fansi_1.0.2 progress_1.2.2 DBI_1.1.2 htmlwidgets_1.5.4 reshape_0.8.8
[37] mapview_2.10.0 stats4_4.0.3 purrr_0.3.4 ellipsis_0.3.2 crosstalk_1.2.0 ks_1.13.3
[43] dplyr_1.0.8 backports_1.4.1 permute_0.9-7 deldir_1.0-6 vctrs_0.3.8 quantreg_5.88
[49] abind_1.4-5 caret_6.0-90 withr_2.4.3 checkmate_2.0.0 rgdal_1.5-28 vegan_2.5-7
[55] prettyunits_1.1.1 mclust_5.4.9 svglite_2.1.0 cluster_2.1.0 pacman_0.5.1 ape_5.6-1
[61] dotCall64_1.0-1 crayon_1.4.2 glmnet_4.1-3 recipes_0.1.17 pkgconfig_2.0.3 labeling_0.4.2
[67] units_0.8-0 nlme_3.1-149 nnet_7.3-14 rlang_1.0.1 globals_0.14.0 lifecycle_1.0.1
[73] MatrixModels_0.5-0 sandwich_3.0-1 extrafontdb_1.0 PresenceAbsence_1.1.9 biomod2_3.5.1 tcltk_4.0.3
[79] randomForest_4.6-14 matrixStats_0.61.0 Matrix_1.2-18 boot_1.3-25 zoo_1.8-9 base64enc_0.1-3
[85] png_0.1-7 rasterVis_0.51.2 KernSmooth_2.23-17 spam_2.8-0 pROC_1.18.0 shape_1.4.6
[91] classInt_0.4-3 stringr_1.4.0 maxnet_0.1.4 ncmeta_0.3.0 maptools_1.1-2 parallelly_1.30.0
[97] jpeg_0.1-9 scales_1.1.1 magrittr_2.0.2 plyr_1.8.6 hexbin_1.28.2 compiler_4.0.3
[103] plotROC_2.2.1 plotrix_3.8-2 cli_3.1.1 ade4_1.7-18 blockCV_2.1.4 ENMeval_0.3.1
[109] listenv_0.8.0 htmlTable_2.4.0 Formula_1.2-4 MASS_7.3-53 mgcv_1.8-38 tidyselect_1.1.1
[115] stringi_1.7.6 forcats_0.5.1 highr_0.9 yaml_2.2.2 latticeExtra_0.6-29 grid_4.0.3
[121] sass_0.4.0 tools_4.0.3 future.apply_1.8.1 CircStats_0.2-6 parallel_4.0.3 rstudioapi_0.13
[127] foreach_1.5.2 foreign_0.8-80 snowfall_1.84-6.1 gridExtra_2.3 prodlim_2019.11.13 farver_2.1.0
[133] digest_0.6.29 rgeos_0.5-9 pracma_2.3.6 ecospat_3.2.1 lava_1.6.10 TeachingDemos_2.12
[139] Rcpp_1.0.8 httr_1.4.2 mda_0.5-2 sf_1.0-6 colorspace_2.0-2 rvest_1.0.2
[145] splines_4.0.3 fields_13.3 systemfonts_1.0.3 jsonlite_1.7.3 leafem_0.1.6 timeDate_3043.102
[151] poibin_1.5 plotmo_3.6.1 ipred_0.9-12 R6_2.5.1 Hmisc_4.6-0 pillar_1.7.0
[157] htmltools_0.5.2 glue_1.6.1 fastmap_1.1.0 class_7.3-17 codetools_0.2-16 mvtnorm_1.1-3
[163] utf8_1.2.2 bslib_0.3.1 tibble_3.1.6 gbm_2.1.8 gtools_3.9.2 misc3d_0.9-1
[169] Rttf2pt1_1.3.10 survival_3.2-7 rmarkdown_2.11 munsell_0.5.0 e1071_1.7-9 iterators_1.0.14
[175] reshape2_1.4.4 gtable_0.3.0 rms_6.2-0
from sdmtune.
Checking in with the same problem. I got the same error after modelReport()
returns the message "Writing model settings..." though perhaps notable without the matrix warning reported above. I would add that modelReport()
does successfully generate folder
/plots/ROC_curve.png; it fails somewhere aftwerwards. My sessionInfo() is as follows:
R version 4.1.2 (2021-11-01)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Monterey 12.3.1
Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libRlapack.dylib
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] kableExtra_1.3.4 dismo_1.3-5 forcats_0.5.1 stringr_1.4.0 dplyr_1.0.7
[6] purrr_0.3.4 readr_2.0.2 tidyr_1.1.4 tibble_3.1.6 ggplot2_3.3.5
[11] tidyverse_1.3.1 zeallot_0.1.0 ENMeval_2.0.3 magrittr_2.0.1 SDMtune_1.1.5
[16] sf_1.0-3 raster_3.5-2 sp_1.4-5
loaded via a namespace (and not attached):
[1] fs_1.5.0 lubridate_1.8.0 webshot_0.5.2
[4] RColorBrewer_1.1-2 progress_1.2.2 httr_1.4.2
[7] bslib_0.3.1 tools_4.1.2 backports_1.3.0
[10] utf8_1.2.2 rgdal_1.5-27 R6_2.5.1
[13] plotROC_2.2.1 KernSmooth_2.23-20 DBI_1.1.1
[16] colorspace_2.0-2 withr_2.4.2 tidyselect_1.1.1
[19] prettyunits_1.1.1 compiler_4.1.2 cli_3.1.0
[22] rvest_1.0.2 xml2_1.3.2 sass_0.4.0
[25] labeling_0.4.2 scales_1.1.1 classInt_0.4-3
[28] hexbin_1.28.2 proxy_0.4-26 systemfonts_1.0.4
[31] digest_0.6.28 svglite_2.1.0 rmarkdown_2.11
[34] htmltools_0.5.2 jpeg_0.1-9 pkgconfig_2.0.3
[37] highr_0.9 fastmap_1.1.0 dbplyr_2.1.1
[40] rlang_0.4.12 readxl_1.3.1 rstudioapi_0.13
[43] jquerylib_0.1.4 farver_2.1.0 generics_0.1.1
[46] zoo_1.8-9 jsonlite_1.7.2 rangeModelMetadata_0.1.4
[49] Rcpp_1.0.7 munsell_0.5.0 fansi_0.5.0
[52] lifecycle_1.0.1 terra_1.5-21 yaml_2.2.1
[55] stringi_1.7.5 whisker_0.4 plyr_1.8.6
[58] grid_4.1.2 parallel_4.1.2 crayon_1.4.2
[61] rasterVis_0.51.2 lattice_0.20-45 haven_2.4.3
[64] cowplot_1.1.1 hms_1.1.1 kuenm_1.1.7
[67] knitr_1.36 pillar_1.6.4 reshape2_1.4.4
[70] codetools_0.2-18 reprex_2.0.1 glue_1.6.0
[73] evaluate_0.14 BRRR_1.2 latticeExtra_0.6-29
[76] modelr_0.1.8 vctrs_0.3.8 png_0.1-7
[79] tzdb_0.2.0 foreach_1.5.1 cellranger_1.1.0
[82] gtable_0.3.0 assertthat_0.2.1 xfun_0.27
[85] broom_0.7.10 e1071_1.7-9 class_7.3-19
[88] viridisLite_0.4.0 audio_0.1-8 rJava_1.0-6
[91] iterators_1.0.13 units_0.7-2 ellipsis_0.3.2
Perhaps it is related to line 46 on template.Rmd? I wonder if there is a way to convert that ./plots/ROC_curve.png to an absolute path? It seems to me like everything the modelReport()
function is supposed to automatically save (train and test.csv, map.tif, model.Rds, and then jackknifing results, marginal and univariate response curves, and ROC_curve.png) is created except for the rendered html.
from sdmtune.
I was able to solve this by changing every element <-
assignment in the modelReport.Rmd document to a manual conversion to the full path, for example:
element <- paste0("<p><a href=\"",plot_folder,"/ROC_curve.png\"><img src=\"",plot_folder,"/ROC_curve.png\" style=\"width: 70%; display: block; margin-left: auto; margin-right: auto;\"></a></p>")
This was required on lines 46, 74, 119, 151, 152, and 154.
The funny thing is you have the code written to do this on line 93 when var also has to be incorporated.
I also had to remove the css: report.css
formatting on line 6 to get it to work.
from sdmtune.
This is solved now in the development version.
@JepsonNomad relative paths were recognised before. This is why I used them for some of the images to shorten the code.
Obviously, pandoc or knitr need a full path now.
Thank you @DevinALyons for reporting the issue
from sdmtune.
Related Issues (20)
- Thanks for that great tool...
- [BUG] modelReport() using RF method: type of predictors in new data do not match that of the training data. HOT 2
- Response Curve error when creating model report HOT 2
- Error when plotting response for categorical predictors -RF-class [BUG] HOT 2
- Problems running the spatial cross validation examples HOT 5
- [BUG] varSel not working after model train HOT 4
- Disable real-time graph??? HOT 2
- How to parse the result from `reduceVar()` to get retained var names? HOT 1
- [Enhancement] Accepting single raster as well HOT 1
- [help wanted] where can set up the bias file of maxent and How to get the model files incliding roc curves, TSS csv tables and responce curves?
- [Bug]:doJK freezes when a continuous variable has many zeros HOT 1
- [Bug]: Please remove dependencies on **rgdal**, **rgeos**, and/or **maptools** HOT 3
- Error in `optimizeModel` when passing a SDMmodelCV object HOT 17
- Differences in variable importance when passing a SDMmodelCV object compared to passing each of the models inside the SDMmodelCV object HOT 5
- Error in plotPA: Continuous value supplied to discrete scale HOT 10
- [BUG] plotPA not working in version 1.10 HOT 12
- [BUG] cluster error during predict with large raster stack HOT 5
- Error in predict when working with Random Forest and specify a categorial variable as a predictor HOT 5
- modelReport fails if response_curves = TRUE or jk=TRUE HOT 14
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sdmtune.