collect_from_args: Collect attributes set in the arguments to a call expression.

Description Usage Arguments Value

View source: R/helpers.R

Description

Given a call expression expr, this function scans the arguments to the call and extracts the attribute attribute from each where the condition predicate evaluates to TRUE, and it concatenates all these.

Usage

1
2
collect_from_args(expr, attribute, condition = function(expr) TRUE,
  include_fun = FALSE)

Arguments

expr

The expression to process.

attribute

The attribute we want to collect from the arguments.

condition

A predicate. Only arguments where the condition evaluates to TRUE will be included in the result.

include_fun

Include the first element in a call, i.e. the function that will be called.

Value

A list or vector obtained by concatenating the attributes from the arguments.


foolbox documentation built on May 1, 2019, 8:44 p.m.