number_with_commas: numbers_with_commas

Description Usage Arguments Examples

View source: R/numberswithcommas.R

Description

Turn a number with commas, which R views as a string, into a numeric class number. Will also remove dollar signs.

Usage

1
number_with_commas(mynumstring)

Arguments

mynumstring

- one or more character strings such as "3,650"

Examples

1
2
3
vect <- c("3,567", "465", "$4,000,654")
number_with_commas(vect)
# [1]    3567     465 4000654

smach/rmiscutils documentation built on Dec. 15, 2021, 1:49 a.m.