[R] How to preserve the numeric format and digits ?

Austin, Matt maustin at amgen.com
Fri Jul 25 03:18:10 CEST 2008


paste("A", format(m, scientific=FALSE, trim=TRUE), "B", sep="")

-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of Daren Tan
Sent: Thursday, July 24, 2008 5:47 PM
To: r-help at stat.math.ethz.ch
Subject: [R] How to preserve the numeric format and digits ?


Instead of

> m <- c(400000000, 50000000000)
> paste("A", m, "B", sep="")
[1] "A4e+08B" "A5e+10B"

I want "A400000000" and "A50000000000"

______________________________________________
R-help at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list