splitdf: splitdf

Description Usage Arguments Value Author(s)

View source: R/splitdf.R

Description

This will randomly split a data frame into training and test sets. I borrowed it from

http://gettinggeneticsdone.blogspot.com/2011/02/split-data-frame-into-testing-and.html

The caret packages has a similar facility using its createDataPartition() function.

Perhaps even more appealing, there is sample.split() in caTools.

Usage

1
splitdf(dataframe, weight = 2/3, seed = NULL)

Arguments

dataframe

this is the data frame you want to split

weight

the weights for the different classes

seed

an optional seed

Value

A list with two members; the training set and the test set

Author(s)

Jesse C. Ross


flightcallr documentation built on May 2, 2019, 5:49 p.m.