coerce_integer: Coerce to Integer

Description Usage Arguments Value See Also Examples

View source: R/coerce_integer.R

Description

Coerces a value to numeric by removing any leading non-digit, non-decimal fields occuring at the end of the character.

Usage

1

Arguments

x

values to be coerced to numeric

strip_units

boolean. Whether to strip the unit from the results.

Value

A numeric field

See Also

The stringr package.

Examples

1
2
3
  coerce_integer( '32 ft/s^2' )
  coerce_integer('1,001 nights' )
  

decisionpatterns/coercion documentation built on Nov. 4, 2019, 10:23 a.m.