powered by
Machine learning helper function to select a subset from a data matrix or a response vector.
mlh_subset(object, ids)
Returns the specified subset of the object.
A vector or a data matrix. Supports also subsetting of "Surv" objects.
An integer vector specifying the indices that should be selected from the object.
data("iris") mlh_subset(iris, c(1:30)) mlh_subset(iris[, 5], c(1:30))
Run the code above in your browser using DataLab