forced: Forcing and forcedness of arguments and quotations.

View source: R/force.R

forcedR Documentation

Forcing and forcedness of arguments and quotations.

Description

There are two kinds of quotations: forced and unforced. Unforced quotations have an expression and an environment; forced quotations have an expression and a value.

forced(q) tests whether a quotation is forced.

forced(d) on a dots object tests whether each element is forced, and returns a logical vector.

force_(x) converts an unforced quotation or dots object into a forced one, by evaluating it.

value(x) or values(...) returns the value of a quotation or dots, forcing it if necessary.

Usage

forced(x)

## S3 method for class 'quotation'
forced(x, ...)

## S3 method for class 'dots'
forced(x)

## Default S3 method:
forced(x)

force_(x, ...)

## S3 method for class 'quotation'
force_(x, eval = base::eval, ...)

## S3 method for class 'dots'
force_(x, ...)

value(x, ...)

## S3 method for class 'quotation'
value(x, mode = "any", ...)

## S3 method for class 'dots'
value(x, ...)

values(x)

## S3 method for class 'dots'
values(x)

Arguments

x

A quotation or dots object.

...

Options used by methods

eval

Which evaluation function to use.

mode

Whether to force in "any" mode or "function" mode (see locate).

Value

forced(x) returns a logical.

value(x) returns the result of forcing the quotation.

values returns a list.

See Also

is_forced forced_quo

force


nseval documentation built on Dec. 8, 2022, 9:13 a.m.