Learn R Programming

kdry (version 0.0.3)

mlh_subset: mlh_subset

Description

Machine learning helper function to select a subset from a data matrix or a response vector.

Usage

mlh_subset(object, ids)

Value

Returns the specified subset of the object.

Arguments

object

A vector or a data matrix. Supports also subsetting of "Surv" objects.

ids

An integer vector specifying the indices that should be selected from the object.

Examples

Run this code
data("iris")
mlh_subset(iris, c(1:30))
mlh_subset(iris[, 5], c(1:30))

Run the code above in your browser using DataLab