train_test_split: Split data into training and test sets

Description Usage Arguments Value

Description

Split data into training and test sets

Usage

1
train_test_split(d, holdout, groups = NULL)

Arguments

d

data frame

holdout

quoted name of column that defines train/test splits.

groups

quoted name of column(s) to group training data by. optional, will be preserved in output (and added as grouping to training data).

Value

data frame with columns 'data_train', 'data_test', one for each level of holdout and group (if specified), which are also included. 'data_test' has the corresponding subset of the input data, and 'data_train' has the rest.


kleinschmidt/phondisttools documentation built on May 20, 2019, 5:57 p.m.