partition: Partition the data

Description Usage Arguments Value Author(s) Examples

View source: R/partition.R

Description

Randomly partitions the data (primarly intended to split into "training" and "test" sets) according to the supplied probabilities.

Usage

1
partition( data, prob = c( 0.7, 0.3 ), set.seed = NULL )

Arguments

data

an (n \times p) matrix or a data.frame.

prob

a numerical vector in [0, 1].

set.seed

a single value, interpreted as an integer, or NULL.

Value

a list which includes the data partitions.

Author(s)

Reza Mohammadi a.mohammadi@uva.nl and Kevin Burke kevin.burke@ul.ie

Examples

1
2
3
data( iris )

partition( data = iris, prob = c( 0.7, 0.3 ) )

liver documentation built on Oct. 27, 2021, 5:06 p.m.