powered by
Randomly partitions the data (primarly intended to split into "training" and "test" sets) according to the supplied probabilities.
partition( data, prob = c( 0.7, 0.3 ) )
an (\(n \times p\)) matrix or a data.frame.
matrix
data.frame
a numerical vector in [0, 1].
a list which includes the data partitions.
# NOT RUN { data( iris ) partition( data = iris, prob = c( 0.7, 0.3 ) ) # }
Run the code above in your browser using DataLab