Skip to contents

Returns all columns except the last one.

Usage

features(x)

Arguments

x

tabular data: Input data to get features from.

Value

Object of the same class as the input, after removing the last column.

Details

This can be applied to tabular datasets used for supervised learning in rtemis, where, by convention, the last column is the outcome variable and all other columns are features.

Author

EDG

Examples

features(iris) |> head()
#>   Sepal.Length Sepal.Width Petal.Length Petal.Width
#> 1          5.1         3.5          1.4         0.2
#> 2          4.9         3.0          1.4         0.2
#> 3          4.7         3.2          1.3         0.2
#> 4          4.6         3.1          1.5         0.2
#> 5          5.0         3.6          1.4         0.2
#> 6          5.4         3.9          1.7         0.4