lazyeval (version 0.2.1)

as_name: Coerce an object to a name or call.

Description

These are a S3 generics with built-in methods for names, calls, formuals, and strings. The distinction between a name and a call is particularly important when coercing from a string. Coercing to a call will parse the string, coercing to a name will create a (potentially) non-syntactic name.

Usage

as_name(x)

as_call(x)

Arguments

x

An object to coerce

Examples

Run this code
# NOT RUN {
as_name("x + y")
as_call("x + y")

as_call(~ f)
as_name(~ f())
# }

Run the code above in your browser using DataLab