splitData: Split data into a training and a test dataset

Description Usage Arguments Value Note

Description

Split data into a training and a test dataset

Usage

1
splitData(data, class, p, pvalid = NULL)

Arguments

data

a dataframe that the user would like to split into training and sample sets

class

character value of the name of the dependent variable

p

the proportion of data to be placed into a training set

pvalid

the proportion of data to be placed into the validation set

Value

A list with the following items:

train

a data frame of the training values

test

a data frame of the test values

indexes

the row indexes of the original data frame selected to be in the training set

Note

Built on the createDataPartition function in the caret package. pvalid is defined against the records remaining after holding out p for the training set.


jknowles/EWStools documentation built on May 19, 2019, 11:42 a.m.