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

R2 and RMSE functions are deprecated? #563

Closed
crossxwill opened this issue Jan 1, 2017 · 2 comments
Closed

R2 and RMSE functions are deprecated? #563

crossxwill opened this issue Jan 1, 2017 · 2 comments

Comments

@crossxwill
Copy link

@crossxwill crossxwill commented Jan 1, 2017

The R2 and RMSE functions appear to be deprecated. Is this true?

> pred <- rnorm(100)
> actuals <- rnorm(100)
> library(caret)
Loading required package: lattice
Loading required package: ggplot2
> R2(pred, actuals)
Error: could not find function "R2"
> RMSE(pred, actuals)
Error: could not find function "RMSE"
> caret::R2(pred, actuals)
Error: 'R2' is not an exported object from 'namespace:caret'
> caret::RMSE(pred, actuals)
Error: 'RMSE' is not an exported object from 'namespace:caret'
> caret:::RMSE(pred, actuals)
Error in get(name, envir = asNamespace(pkg), inherits = FALSE) : 
  object 'RMSE' not found
> sessionInfo()
R version 3.3.2 (2016-10-31)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

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

other attached packages:
[1] caret_6.0-73    ggplot2_2.2.1   lattice_0.20-34

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.8        magrittr_1.5       splines_3.3.2      MASS_7.3-45        munsell_0.4.3     
 [6] colorspace_1.3-2   foreach_1.4.3      minqa_1.2.4        stringr_1.1.0      car_2.1-4         
[11] plyr_1.8.4         tools_3.3.2        parallel_3.3.2     nnet_7.3-12        pbkrtest_0.4-6    
[16] grid_3.3.2         gtable_0.2.0       nlme_3.1-128       mgcv_1.8-15        quantreg_5.29     
[21] MatrixModels_0.4-1 iterators_1.0.8    lme4_1.1-12        lazyeval_0.2.0     assertthat_0.1    
[26] tibble_1.2         Matrix_1.2-7.1     nloptr_1.0.4       reshape2_1.4.2     ModelMetrics_1.1.0
[31] codetools_0.2-15   stringi_1.1.2      scales_0.4.1       stats4_3.3.2       SparseM_1.74      
@coforfe
Copy link

@coforfe coforfe commented Jan 1, 2017

Hello,

You get them now with function postResample()

> set.seed(10)
> pred <- rnorm(100)
> actuals <- rnorm(100)
> postResample(pred, actuals)
       RMSE    Rsquared 
1.383517644 0.003368004 

Regards,
Carlos.

@topepo
Copy link
Owner

@topepo topepo commented Jan 1, 2017

They were accidentally not exported when we switched over to using roxygen for documentation.

You should get them if you use devtools to install caret form here. Otherwise, they will be exported in the next release.

@topepo topepo closed this Jan 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.