Skip to content

Error in cal_plot_breaks() #144

@ayueme

Description

@ayueme

Hello there,
I'm learning the cal_plot_breaks() function following the example. When I changed the name of the example dataset, however, I always got errors. The following is my code:

library(probably)
library(dplyr)

# change column name
segment_logistic_1 <- rename(segment_logistic, good_prob=.pred_good)

# error
cal_plot_breaks(segment_logistic_1,Class,good_prob)

Error in `purrr::map()`:
ℹ In index: 2.
Caused by error in `estimate_str[[.x]]`:
! subscript out of bounds
Run `rlang::last_trace()` to see where the error occurred.

Is this a bug or a special feature? Thank you very much.

my session info:

> sessionInfo()
R version 4.3.2 (2023-10-31 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 11 x64 (build 22631)

Matrix products: default


locale:
[1] LC_COLLATE=Chinese (Simplified)_China.utf8 
[2] LC_CTYPE=Chinese (Simplified)_China.utf8   
[3] LC_MONETARY=Chinese (Simplified)_China.utf8
[4] LC_NUMERIC=C                               
[5] LC_TIME=Chinese (Simplified)_China.utf8    

time zone: Asia/Shanghai
tzcode source: internal

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

other attached packages:
[1] dplyr_1.1.4    probably_1.0.3

loaded via a namespace (and not attached):
 [1] gtable_0.3.4         xfun_0.41            ggplot2_3.5.1       
 [4] recipes_1.0.9        lattice_0.21-9       vctrs_0.6.5         
 [7] tools_4.3.2          generics_0.1.3       stats4_4.3.2        
[10] parallel_4.3.2       tibble_3.2.1         fansi_1.0.6         
[13] pkgconfig_2.0.3      ModelMetrics_1.2.2.2 Matrix_1.6-1.1      
[16] data.table_1.15.2    lhs_1.1.6            GPfit_1.0-8         
[19] lifecycle_1.0.4      farver_2.1.1         compiler_4.3.2      
[22] stringr_1.5.1        munsell_0.5.0        codetools_0.2-19    
[25] DiceDesign_1.10      class_7.3-22         tune_1.1.2          
[28] prodlim_2023.08.28   furrr_0.3.1          pillar_1.9.0        
[31] tidyr_1.3.0          MASS_7.3-60          gower_1.0.1         
[34] yardstick_1.3.1      iterators_1.0.14     rpart_4.1.21        
[37] foreach_1.5.2        nlme_3.1-163         parallelly_1.36.0   
[40] lava_1.7.3           dials_1.2.0          tidyselect_1.2.0    
[43] digest_0.6.33        stringi_1.8.3        future_1.33.0       
[46] reshape2_1.4.4       purrr_1.0.2          listenv_0.9.0       
[49] labeling_0.4.3       splines_4.3.2        parsnip_1.2.1       
[52] grid_4.3.2           colorspace_2.1-0     cli_3.6.2           
[55] magrittr_2.0.3       survival_3.5-7       utf8_1.2.4          
[58] future.apply_1.11.0  withr_2.5.2          scales_1.3.0        
[61] lubridate_1.9.3      timechange_0.2.0     globals_0.16.2      
[64] nnet_7.3-19          timeDate_4032.109    workflows_1.1.4     
[67] knitr_1.45           hardhat_1.3.0        caret_6.0-94        
[70] rsample_1.2.0        rlang_1.1.2          Rcpp_1.0.11         
[73] glue_1.6.2           pROC_1.18.5          ipred_0.9-14        
[76] rstudioapi_0.15.0    R6_2.5.1             plyr_1.8.9  

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions