Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

evaluateOcc strange behaviour #8

Open
Delvis opened this issue Dec 1, 2022 · 0 comments
Open

evaluateOcc strange behaviour #8

Delvis opened this issue Dec 1, 2022 · 0 comments

Comments

@Delvis
Copy link

Delvis commented Dec 1, 2022

I have multiple .R pipelines from 2018 and 2019 that relied on oneClass and are currently not working at the evaluateOcc() step.
In fact, I just tried to run the notebook example from the package in a fresh installation of R and got the same error.

> ocsvm.ev <- evaluateOcc(ocsvm.fit, te.u=te.x, te.y=te.y, allModels=TRUE, positive=1)

Error in if ((class(newdata) == "rasterTiled" | .is.raster(newdata)) & :
the condition has length > 1

I have been trying to debug for a few days without success. Considering that the issue is not only affecting my datasets but also the examples provided by the package I wonder if this can be a new incompatibility between evaluateOcc function and the packages it relies on?

> sessionInfo()
R version 4.2.1 (2022-06-23 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 22621)

Matrix products: default

Random number generation:
 RNG:     Mersenne-Twister 
 Normal:  Inversion 
 Sample:  Rounding 
 
locale:
[1] LC_COLLATE=English_United Kingdom.utf8  LC_CTYPE=English_United Kingdom.utf8   
[3] LC_MONETARY=English_United Kingdom.utf8 LC_NUMERIC=C                           
[5] LC_TIME=English_United Kingdom.utf8    

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

other attached packages:
 [1] doParallel_1.0.17 iterators_1.0.14  foreach_1.5.2     oneClass_0.5.0   
 [5] kernlab_0.9-31    pROC_1.18.0       caret_6.0-93      lattice_0.20-45  
 [9] e1071_1.7-12      zoo_1.8-11        ggplot2_3.3.6     maptools_1.1-5   
[13] raster_3.6-3      sp_1.5-0         

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.9           lubridate_1.8.0      listenv_0.8.0       
 [4] class_7.3-20         assertthat_0.2.1     digest_0.6.29       
 [7] ipred_0.9-13         utf8_1.2.2           parallelly_1.32.1   
[10] R6_2.5.1             plyr_1.8.7           hardhat_1.2.0       
[13] stats4_4.2.1         pillar_1.8.1         rlang_1.0.6         
[16] rstudioapi_0.14      data.table_1.14.4    rpart_4.1.19        
[19] Matrix_1.5-1         splines_4.2.1        rgdal_1.5-32        
[22] foreign_0.8-83       gower_1.0.0          stringr_1.4.1       
[25] munsell_0.5.0        proxy_0.4-27         compiler_4.2.1      
[28] pkgconfig_2.0.3      dismo_1.3-9          globals_0.16.1      
[31] nnet_7.3-18          mmap_0.6-19          tidyselect_1.2.0    
[34] gridExtra_2.3        tibble_3.1.8         prodlim_2019.11.13  
[37] codetools_0.2-18     viridisLite_0.4.1    fansi_1.0.3         
[40] future_1.28.0        dplyr_1.0.10         withr_2.5.0         
[43] MASS_7.3-58.1        recipes_1.0.2        ModelMetrics_1.2.2.2
[46] grid_4.2.1           nlme_3.1-160         gtable_0.3.1        
[49] lifecycle_1.0.3      DBI_1.1.3            magrittr_2.0.3      
[52] scales_1.2.1         future.apply_1.9.1   cli_3.4.1           
[55] stringi_1.7.8        reshape2_1.4.4       viridis_0.6.2       
[58] timeDate_4021.106    spatial.tools_1.6.2  generics_0.1.3      
[61] vctrs_0.4.2          lava_1.7.0           tools_4.2.1         
[64] glue_1.6.2           purrr_0.3.5          abind_1.4-5         
[67] survival_3.4-0       colorspace_2.0-3     terra_1.6-17

Best,
J

@Delvis Delvis changed the title oneClass' evaluateOcc strange behaviour evaluateOcc strange behaviour Dec 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant