as_number: Takes a string and removes all comma delimeters and '%'...

as_numberR Documentation

Takes a string and removes all comma delimeters and '%' signs, before converting to a numerical format.

Description

Takes a string and removes all comma delimeters and '%' signs, before converting to a numerical format.

Usage

as_number(x)

Arguments

x

A formatted number string

Examples

as_number("1,000")  #  returns 1000
as_number("10%")  #  returns 10

moj-analytical-services/RAP_code_library documentation built on Aug. 19, 2023, 2:41 p.m.