comify | R Documentation |
Often for nice presentation of genomic locations it is helpful to insert commas every 3 digits when numbers are large. This function makes it simple and allows specification of digits if a decimal number is in use.
comify(x, digits = 2)
x |
a vector of numbers, either as character, integer or numeric form |
digits |
integer, if decimal numbers are in use, how many digits to display, same as input to base::round() |
returns a character vector with commas inserted every 3 digits
comify("23432") comify(x=c(1,25,306,999,1000,43434,732454,65372345326)) comify(23432.123456) comify(23432.123456,digits=0)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.