tidymodels / tidyposterior

Bayesian comparisons of models using resampled statistics
https://tidyposterior.tidymodels.org
Other
102 stars 10 forks source link

Fix Getting Started #28

Closed rodgerbenham closed 5 years ago

rodgerbenham commented 5 years ago

Hello thanks for the fantastic R library.

In the Getting Started guide found at https://tidymodels.github.io/tidyposterior/articles/Getting_Started.html

Please change the line:

rocs_stacked <- gather(rocs)

To:

rocs_stacked <- gather(rocs, key = model, value = statistic, -id)

As the column headers are otherwise key and value in the rocs_stacked datatable only, which then does not work when graphing:

ggplot(rocs_stacked, aes(x = model, y = statistic, group = id, col = id)) + 
  geom_line(alpha = .75) + 
  theme(legend.position = "none")

Not sure if this broke due to different versions of something, my session info:

R version 3.5.2 (2018-12-20)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Sierra 10.12.4

Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib

locale:
[1] en_AU.UTF-8/en_AU.UTF-8/en_AU.UTF-8/C/en_AU.UTF-8/en_AU.UTF-8

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

other attached packages:
 [1] forcats_0.3.0       stringr_1.3.1       purrr_0.3.0         readr_1.3.1         tidyr_0.8.2         tibble_2.0.1       
 [7] tidyverse_1.2.1     bindrcpp_0.2.2      dplyr_0.7.8         tidyposterior_0.0.2 ggplot2_3.1.0      

loaded via a namespace (and not attached):
 [1] nlme_3.1-137       matrixStats_0.54.0 xts_0.11-2         lubridate_1.7.4    threejs_0.3.1      httr_1.4.0        
 [7] rstan_2.18.2       tools_3.5.2        backports_1.1.3    utf8_1.1.4         R6_2.3.0           DT_0.5            
[13] lazyeval_0.2.1     colorspace_1.4-0   withr_2.1.2        tidyselect_0.2.5   gridExtra_2.3      prettyunits_1.0.2 
[19] processx_3.2.1     compiler_3.5.2     rvest_0.3.2        cli_1.0.1          xml2_1.2.0         shinyjs_1.0       
[25] labeling_0.3       colourpicker_1.0   scales_1.0.0       dygraphs_1.1.1.6   ggridges_0.5.1     callr_3.1.1       
[31] digest_0.6.18      StanHeaders_2.18.1 minqa_1.2.4        rstanarm_2.18.2    base64enc_0.1-3    pkgconfig_2.0.2   
[37] htmltools_0.3.6    lme4_1.1-19        readxl_1.2.0       htmlwidgets_1.3    rlang_0.3.1        rstudioapi_0.9.0  
[43] shiny_1.2.0        bindr_0.1.1        generics_0.0.2     jsonlite_1.6       zoo_1.8-4          crosstalk_1.0.0   
[49] gtools_3.8.1       inline_0.3.15      magrittr_1.5       loo_2.0.0          bayesplot_1.6.0    Matrix_1.2-15     
[55] Rcpp_1.0.0         munsell_0.5.0      fansi_0.4.0        stringi_1.2.4      yaml_2.2.0         MASS_7.3-51.1     
[61] pkgbuild_1.0.2     plyr_1.8.4         grid_3.5.2         parallel_3.5.2     promises_1.0.1     crayon_1.3.4      
[67] miniUI_0.1.1.1     lattice_0.20-38    haven_2.0.0        splines_3.5.2      hms_0.4.2          ps_1.3.0          
[73] pillar_1.3.1       igraph_1.2.2       markdown_0.9       shinystan_2.5.0    reshape2_1.4.3     codetools_0.2-16  
[79] stats4_3.5.2       rstantools_1.5.1   glue_1.3.0         rsample_0.0.4      modelr_0.1.2       nloptr_1.2.1      
[85] httpuv_1.4.5.1     cellranger_1.1.0   gtable_0.2.0       assertthat_0.2.0   mime_0.6           xtable_1.8-3      
[91] broom_0.5.1        later_0.7.5        rsconnect_0.8.13   survival_2.43-3    shinythemes_1.1.2 

Thanks!

topepo commented 5 years ago

Yes. I made more specific changes in #27

github-actions[bot] commented 3 years ago

This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.