cleaner_conversions: Cleaner conversion functions

Description Usage Arguments

Description

Cleaner conversion functions

Usage

1
2
3
4
5
6
7
8
9
chr(x, ...)

int(x, ...)

dbl(x, ...)

num(x, ...)

bool(x, ...)

Arguments

x

Value to be converted

...

other args for as. conversion

# Shorthand aliases for common conversions # Nothing magical here, but it can make your code more readable

chr(42) # "42" = as.character int(42.1) # 42L = as.integer dbl("42L") # 42.0 = as.double num("42") # 42 = as.numeric bool(42) # TRUE = as.logical


roperators documentation built on May 1, 2019, 6:27 p.m.