Short aliases for the most common as.* conversions. There is nothing
magical here, but the shorter names can make data-wrangling code much easier
to read, especially for users coming from other languages. as.class()
additionally converts to a class chosen by name at run time.
Examples
chr(42) # "42" = as.character()
#> [1] "42"
int(42.1) # 42L = as.integer()
#> [1] 42
dbl("42") # 42 = as.double()
#> [1] 42
num("42") # 42 = as.numeric()
#> [1] 42
bool(42) # TRUE = as.logical()
#> [1] TRUE
# as.class() converts to an arbitrary class chosen by name:
as.class(255, "roman") # CCLV
#> [1] CCLV