blob: 2ac7ef5d1d1ab4e714ba71b5da641935742cbd18 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
% Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/partition.R
\name{dataPartition}
\alias{dataPartition}
\title{Split data into training and validation sets}
\usage{
dataPartition(data, p = 0.6)
}
\arguments{
\item{data}{an object of class \code{idframe}}
\item{p}{the percentage of the data that goes to training (Default : \code{0.6})}
}
\value{
list containing estimation and validation idframe datas
}
\description{
The function splits the data into training and validation sets and returns them bundled
as a list. The size of the sets are determined by the parameter \code{p}.
}
\examples{
data(cstr)
splitList <- dataPartition(cstr,p=0.6)
train <- splitList$estimation # training set
test <- splitList$validation # testing set
}
|