attr_eval {diyar}R Documentation

Sub-criteria attributes.

Description

Recursive evaluation of a function (func) on each attribute (vector) in a sub_criteria.

Usage

attr_eval(x, func = length, simplify = TRUE)

Arguments

x

[sub_criteria]

func

[function]

simplify

If TRUE (default), coerce to a vector.

Value

vector; list

Examples

x <- sub_criteria(rep(1, 5), rep(5 * 10, 5))
attr_eval(x)
attr_eval(x, func = max)
attr_eval(x, func = max, simplify = FALSE)
attr_eval(sub_criteria(x, x), func = max, simplify = FALSE)

[Package diyar version 0.5.1 Index]