traintest: Create training/testing sets

Description Usage Arguments Examples

Description

Split a dataset into training and testing sets based on a training/testing percentage

Usage

1
trainTest(dat, p.train = 0.7, sort = FALSE)

Arguments

dat

A data.frame or matrix that you want to split into training/testing sets. It is assumed that each row is a separate observation

p.train

Numeric. A number between 0 and 1 dictating what percentage of the data will be put in the training set

sort

Logical. Whether you want the training/testing sets to be sorted in the same order as the original data.

Examples

1

Dasonk/Dmisc documentation built on May 6, 2019, 1:36 p.m.