Instead of> m <- c(400000000, 50000000000) > paste("A", m, "B", sep="")[1] "A4e+08B" "A5e+10B" I want "A400000000" and "A50000000000"
Like this?
options (scipen=100)
m <- c(400000000, 50000000000)
paste("A", m, "B", sep="")
Regards,
Miltinho astronauta
brazil
On 7/24/08, Daren Tan <daren76@hotmail.com> wrote:>
>
> Instead of
>
> > m <- c(400000000, 50000000000)
> > paste("A", m, "B", sep="")
> [1] "A4e+08B" "A5e+10B"
>
> I want "A400000000" and "A50000000000"
>
> ______________________________________________
> R-help@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.
>
[[alternative HTML version deleted]]
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.