Last chance! 50% off unlimited learning
Sale ends in
Create a subset of a dataset
create_subset(mdata, rows, cols = NULL)
A mldr dataset
A vector with the instances indexes (names or indexes).
A vector with the attributes indexes (names or indexes).
A new mldr subset
Other sampling: create_holdout_partition
,
create_kfold_partition
,
create_random_subset
# NOT RUN {
## Create a dataset with the 20 first examples and the 7 first attributes
small.toy <- create_subset(toyml, seq(20), seq(7))
## Create a random dataset with 50 examples and 5 attributes
random.toy <- create_subset(toyml, sample(100, 50), sample(10, 5))
# }
Run the code above in your browser using DataLab