parse_maybe_number: Parse a value to numeric

parse_maybe_numberR Documentation

Parse a value to numeric

Description

If x is character, attempts to parse the first occurence of a sub-string that looks like a number.

Usage

parse_maybe_number(x, default = NULL)

Arguments

x

Value to test and coerce

default

Default value to assign to x if not a character string, NA_character_, or a factor.

Value

x parsed as numeric, if possible


pepfar-datim/datapackr documentation built on April 14, 2024, 10:35 p.m.