Convert human-readable string to numeric number

to_numeric(string, family = "number", errors = "raise", custom_suff = NULL)

Arguments

string

string

family

family of suffix, numeric or filesize

errors

'raise', 'coerce', default 'raise' If 'raise', then invalid parsing will raise an exception. If 'coerce', then invalid parsing will return NA.

custom_suff

List of custom suffixes, default NULL

Value

a computer-readable numeric number

Examples

to_numeric("69.4K")
#> [1] 69400
69400
#> [1] 69400