Compares the results of predict() and tidypredict_to_column() functions.

tidypredict_test(model, df = model$model, threshold = 1e-12,
  include_intervals = FALSE, max_rows = NULL)



An R model or a tibble with a parsed model. It currently supports lm(), glm() and randomForest() models.


A data frame that contains all of the needed fields to run the prediction. It defaults to the "model" data frame object inside the model object.


The number that a given result difference, between predict() and tidypredict_to_column() should not exceed. For continuous predictions, the default value is 0.000000000001 (1e-12), for categorical predictions, the default value is 0.


Switch to indicate if the prediction intervals should be included in the test. It defaults to FALSE.


The number of rows in the object passed in the df argument. Highly recommended for large data sets.


library(dplyr) df <- mutate(mtcars, cyl = paste0("cyl", cyl)) model <- lm(mpg ~ wt + cyl * disp, offset = am, data = df) tidypredict_test(model)
#> tidypredict test results #> Difference threshold: 1e-12 #> #> All results are within the difference threshold
Skip to content This repository Search Pull requests Issues Marketplace Explore @edgararuiz Sign out Unwatch 9 Star 5 Fork 5 rstudio/db.rstudio.com Code Issues 6 Pull requests 0 Projects 0 Wiki Insights Settings Tree: 7a7548589f Find file Copy pathdb.rstudio.com/themes/hugo-material-docs/layouts/partials/footer_js.html 7a75485 on Apr 22, 2017 @edgararuiz edgararuiz Fix to theme's scrollspy 1 contributor RawBlameHistory 84 lines (73 sloc) 2.83 KB © 2018 GitHub, Inc. Terms Privacy Security Status Help Contact GitHub API Training Shop Blog About