Separating Numbers with Comma in R

In this tutorial, I’ll illustrate how to separate numbers with a comma in the R programming language.

Creation of Example Data

my_number <- 17436238745232984673    # Create large number object

Example: Separating Numbers with Comma Using prettyNum Function

prettyNum(my_number,                 # Application of prettyNum
          big.mark = ",",
          scientific = FALSE)
# "17,436,238,745,232,984,064"

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.
You need to agree with the terms to proceed

Menu
Top