The atomic vector constructors are equivalent to
lgl(...) int(...) dbl(...) cpl(...) chr(...) bytes(...)
Components of the new vector. Bare lists and explicitly spliced lists are spliced.
All the abbreviated constructors such as
lgl() will probably be
moved to the vctrs package at some point. This is why they are
marked as questioning.
Automatic splicing is soft-deprecated and will trigger a warning
in a future version. Please splice explicitly with
# These constructors are like a typed version of c(): c(TRUE, FALSE)#>  TRUE FALSElgl(TRUE, FALSE)#>  TRUE FALSE# They follow a restricted set of coercion rules: int(TRUE, FALSE, 20)#>  1 0 20# Lists can be spliced: dbl(10, !!! list(1, 2L), TRUE)#>  10 1 2 1# They splice names a bit differently than c(). The latter # automatically composes inner and outer names: c(a = c(A = 10), b = c(B = 20, C = 30))#> a.A b.B b.C #> 10 20 30# On the other hand, rlang's ctors use the inner names and issue a # warning to inform the user that the outer names are ignored: dbl(a = c(A = 10), b = c(B = 20, C = 30))#> Warning: Outer names are only allowed for unnamed scalar atomic inputs#> A B C #> 10 20 30dbl(a = c(1, 2))#> Warning: Outer names are only allowed for unnamed scalar atomic inputs#>  1 2# As an exception, it is allowed to provide an outer name when the # inner vector is an unnamed scalar atomic: dbl(a = 1)#> a #> 1# Spliced lists behave the same way: dbl(!!! list(a = 1))#> a #> 1#> Warning: Outer names are only allowed for unnamed scalar atomic inputs#> A #> 1# bytes() accepts integerish inputs bytes(1:10)#>  01 02 03 04 05 06 07 08 09 0a#>  01 ff 03 05 0a 14 1e