crtests: Classification and Regression Tests

Provides wrapper functions for running classification and regression tests using different machine learning techniques, such as Random Forests and decision trees. The package provides standardized methods for preparing data to suit the algorithm's needs, training a model, making predictions, and evaluating results. Also, some functions are provided to run multiple instances of a test.

Install the latest version of this package by entering the following in R:
AuthorSjoerd van der Spoel [aut, cre]
Date of publication2016-05-20 22:36:56
MaintainerSjoerd van der Spoel <>
LicenseGPL-3 | file LICENSE

View on CRAN

Man pages

apply_levels: Converts the column factor levels in 'df' to those in...

argument_match_test: Test function with non-matching arguments

capitalize_first: Capitalize the first letter of a word

classification_model: Generic function for creating a classification model

create_and_run_test: Create test and run it

createtest: Create a classification or regression test case

crtests: crtests: A package for creating and executing classification...

drop_na: Remove NAs according to a strategy

evaluate: Evaluate the performance of a prediction.

evaluate_problem: Generic function for evaluation of test results

evaluation: Create an evaluation object

extract_formula: Extract a formula from a test

factor_length: Determine the length of the factors in a data.frame

group_levels: Group infrequent levels in 'data', either a factor or a...

group_levels.default: Group infrequent factor levels

is_complete_row: Determine if the rows in a data.frame have NAs

make_predictions: Make predictions using a model Generic function for testing a...

method_prepare: Method-specific data preparation

multisample: Make multiple samples of data

multitest: Create and run multiple instances of a test

multitest_evaluation: Create an evaluation of multiple tests

na_count: Count the number of NAs in an object

prepare: Prepare the data for the specified test.

prepare_data: Prepare data for training or testing.

print.evaluation: Print an 'evaluation' object

print.multitest_evaluation: Print a multitest_evaluation

print.multitest_evaluation.summary: Print a multitest_evaluation.summary object

random_string: Generate a random string

regression_model: Fit a regression model Generic function for fitting a...

remove_names: Set any names of x to ""

replace_names: Replace strings in the names of an object

runtest: Run a classification or regression test

summary.evaluation: Summary of an evaluation

summary.multitest_evaluation: Make a summary of multiple test evaluations

train_model: Train a classification or regression model

util: Utility functions


apply_levels Man page
argument_match_test Man page
capitalize_first Man page
classification_model Man page
classification_model.boosting Man page
classification_model.default Man page
classification_model.rpart Man page
create_and_run_test Man page
createtest Man page
crtests Man page
crtests-package Man page
drop_na Man page
evaluate Man page
evaluate_problem Man page
evaluate_problem.classification Man page
evaluate_problem.regression Man page
evaluation Man page
extract_formula Man page
factor_length Man page
group_levels Man page Man page
group_levels.default Man page
group_levels.factor Man page
group_levels.list Man page
is_complete_row Man page
make_predictions Man page
make_predictions.boosting Man page
make_predictions.default Man page
make_predictions.gbm Man page
make_predictions.rpart Man page
method_prepare Man page
method_prepare.default Man page
method_prepare.randomForest Man page
missing_argument_test Man page
multisample Man page
multisample.cross_fold Man page
multisample.random Man page
multitest Man page
multitest_evaluation Man page
na_count Man page Man page
na_count.default Man page
prepare Man page
prepare_data Man page
prepare.default Man page
print.evaluation Man page
print.multitest_evaluation Man page
print.multitest_evaluation.summary Man page
random_string Man page
regression_model Man page
regression_model.default Man page
remove_names Man page
remove_names.matrix Man page
replace_names Man page Man page
replace_names.default Man page
replace_names.matrix Man page
runtest Man page
runtest.default Man page
summary.evaluation Man page
summary.multitest_evaluation Man page
train_model Man page
train_model.classification Man page
train_model.regression Man page
util Man page


tests/testthat/test.prepare.R tests/testthat/test.runtest.R tests/testthat/test.evaluate.R tests/testthat/test.createtest.R
R/multisample.R R/method_prepare.R R/train_helpers.R R/prepare_helpers.R R/evaluate.R R/multitest_helpers.R R/train_model.R R/crtests.R R/prepare.R R/regression_model.R R/multitest.R R/classification_model.R R/runtest.R R/createtest.R R/util.R R/evaluate_helpers.R R/make_predictions.R
man/evaluation.Rd man/capitalize_first.Rd man/replace_names.Rd man/prepare_data.Rd man/create_and_run_test.Rd man/summary.multitest_evaluation.Rd man/evaluate_problem.Rd man/group_levels.Rd man/evaluate.Rd man/group_levels.default.Rd man/util.Rd man/factor_length.Rd man/print.evaluation.Rd man/remove_names.Rd man/train_model.Rd man/drop_na.Rd man/prepare.Rd man/is_complete_row.Rd man/classification_model.Rd man/apply_levels.Rd man/random_string.Rd man/multisample.Rd man/na_count.Rd man/regression_model.Rd man/method_prepare.Rd man/multitest_evaluation.Rd man/multitest.Rd man/crtests.Rd man/summary.evaluation.Rd man/print.multitest_evaluation.summary.Rd man/make_predictions.Rd man/extract_formula.Rd man/print.multitest_evaluation.Rd man/createtest.Rd man/runtest.Rd man/argument_match_test.Rd

Questions? Problems? Suggestions? or email at

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.