Skip to contents

as_ functions coerce values to another type.

as_num

The goal of as_num is to be a more generalized version of as.numeric, where the input is a string with numbers and marks, such as “10.000,02”.

as_num("123.456,78")
#> [1] 123456.8