attr_eval: Sub-criteria attributes.

View source: R/conv_funcs.R

attr_evalR 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)

diyar documentation built on Nov. 13, 2023, 1:08 a.m.