[R] R graphic help

Jim Lemon jim at bitwrit.com.au
Sun Jul 18 12:29:55 CEST 2010


On 07/18/2010 06:58 PM, Timothy O'Brien wrote:
> Dear All,
>
> I've done some searching, but to no avail --
>
> I'm plotting x-y data via the "plot" command, and the "log=x" command.
>
> The graphed x values are in scientific notation (1e-02 1e-01 1e+00 etc).
> Might you have some idea on how I can get the plot to uses the x values
> (0.01 0.10 1.0 10.0 etc) instead?  A related Q - where might a good place to
> search for such answers?  I've tried using Google searches and reading some
> posted Manuals but ...
>
Hi Tim,
The "scipen" option is the one usually recommended for this. R works out 
how to print a number in a way that is (hopefully) maximally informative 
and minimally long. By "penalizing" this method, you can suppress 
scientific notation most of the time:

print(100000)
[1] 1e+05
options(scipen=4)
print(100000)
[1] 100000

On the R home page is an option "Search". The first search listed is Jon 
Baron's searchable archive messages, functions, etc. and is a good place 
to start. In this case, you would have to take two steps - see the 
"scipen" option mentioned and then look at the "options" help page. 
Usually you will get the answer straight from the search, _if_ you 
choose the correct search terms (life is never simple).

Jim



More information about the R-help mailing list