You can try this
num <- c("1.23M", "15.69B", "123.999M")
num <- gsub('B', 'e9', num)
num <- gsub('M', 'e6', num)
format(as.numeric(num), scientific = FALSE, big.mark = ",")
"84,060,000" "30,120,000,000" "251,290,000"
More Related Contents:
- R spreading multiple columns with tidyr [duplicate]
- Reshape multiple values at once
- How to complete missing factor levels in data frame?
- How to transpose a dataframe in tidyverse?
- Quickly reading very large tables as dataframes
- Reshape three column data frame to matrix (“long” to “wide” format) [duplicate]
- Convert a list to a data frame
- Split a large dataframe into a list of data frames based on common value in column
- Splitting a dataframe string column into multiple different columns [duplicate]
- Conditional replacement of values in a data.frame
- How do I combine two data-frames based on two columns? [duplicate]
- R Apply() function on specific dataframe columns
- Count NAs per row in dataframe [duplicate]
- Spread with data.frame/tibble with duplicate identifiers
- Using spread with duplicate identifiers for rows
- Add (insert) a column between two columns in a data.frame
- Add a prefix to column names
- Create a Data Frame of Unequal Lengths
- apply a function over groups of columns
- Specifying column names in a data.frame changes spaces to “.”
- Convert from billion to million and vice versa
- Delete a column in a data frame within a list
- Dollar sign before a variable
- R: Replace multiple values in multiple columns of dataframes with NA
- R convert dataframe to JSON
- Select rows from one data.frame that are not present in a second data.frame
- How to sort all dataframes in a list of dataframes on the same column?
- Join two data frames in R based on closest timestamp
- Shifting a column down by one
- Identifying where value changes in R data.frame column