Examples for 'rlang::as_label'


Create a default name for an R object

Aliases: as_label

Keywords:

### ** Examples

# as_label() is useful with quoted expressions:
as_label(expr(foo(bar)))
[1] "foo(bar)"
as_label(expr(foobar))
[1] "foobar"
# It works with any R object. This is also useful for quoted
# arguments because the user might unquote constant objects:
as_label(1:3)
[1] "<int>"
as_label(base::list)
[1] "<fn>"

[Package rlang version 1.1.4 Index]