Learn R Programming

niarules (version 0.2.0)

feature_position: Get the position of a feature.

Description

This function returns the position of a feature in the vector, considering the type of the feature.

Usage

feature_position(features, feature)

Value

The position of the feature.

Arguments

features

The features list.

feature

The name of the feature to find.

Examples

Run this code
features <- list(
  feature1 = list(type = "numerical"),
  feature2 = list(type = "categorical"),
  feature3 = list(type = "numerical")
)
position <- feature_position(features, "feature2")

Run the code above in your browser using DataLab