[R] Scientific Notation
Duncan Murdoch
murdoch at stats.uwo.ca
Wed Sep 26 17:35:56 CEST 2007
On 9/26/2007 11:24 AM, Jacques Wagnor wrote:
> Dear List:
>
> Below is how I specify an axis:
>
> axis(2, at=c(0.00005, 0.0005))
>
> R displays the numbers in scientific notation. What
> argument/parameter should I use to tell R to display the numbers as
> specified rather than in scientific notation?
Something like
axis(2, at=c(0.00005, 0.0005), labels=c("0.00005", "0.0005"))
is a way to be 100% sure of what will be displayed, but in this
particular instance,
at <- c(0.00005, 0.0005)
axis(2, at=at, labels=format(at, sci=FALSE))
comes close, and there may be some other format spec that gets exactly
what you want.
Duncan Murdoch
More information about the R-help
mailing list