Create a default name for an R objectSource:
as_label() transforms R objects into a short, human-readable
description. You can use labels to:
Display an object in a concise way, for example to labellise axes in a graphical plot.
Give default names to columns in a data frame. In this case, labelling is the first step before name repair.
In general, if you don't know for sure what kind of object you're
dealing with (a call, a symbol, an unquoted constant), use
as_label() and make no assumption about the resulting string. If
you know you have a symbol and need the name of the object it
refers to, use
as_name(). For instance, use
objects captured with
as_name() with symbols
as_name() for transforming symbols back to a string
# as_label() is useful with quoted expressions: as_label(expr(foo(bar))) #>  "foo(bar)" as_label(expr(foobar)) #>  "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) #>  "<int>" as_label(base::list) #>  "<fn>"