Learn R Programming

IFC (version 0.2.1)

get_feat_value: Feature Values Computation

Description

Computes feature values from feature definition

Usage

get_feat_value(
  feat_def,
  features,
  alt_names,
  operators = c("+", "-", "*", "/", "(", ")", "ABS", "COS", "SIN", "SQR", "SQRT"),
  split = "|"
)

Value

a vector of feature values.

Arguments

feat_def

a feature definition as created by buildFeature.

features

a data.frame of features, typically an object of class `IFC_features`.

alt_names

vector of same length as features to use for substitution. It can be used to speed up the process.

operators

operators used. Default is c("+", "-", "*", "/", "(", ")", "ABS", "COS", "SIN", "SQR", "SQRT").

split

string used for splitting. Default is "|".

Details

if 'feat_def$type' is "combined" returned value will be computed according in the scope of 'features' according to 'feat_def$def'. Otherwise, 'feat_def$name' will be searched in 'features' to return value, and if not found 'feat_def$val' will be returned.