as_name.RdThese 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.
as_name(x)
as_call(x)as_name("x + y")
#> `x + y`
as_call("x + y")
#> x + y
as_call(~ f)
#> f()
as_name(~ f())
#> f