[R] log axis assignment

Morten Sickel Morten.Sickel at nrpa.no
Tue Mar 4 10:38:02 CET 2003


From: Jeremy Z Butler [mailto:jerrytheshrub at hotmail.com]
> Surely I should be able to set the 
> ylog option to T using another object (logaxis).
>
>for (n in colnames(raw))
>{
>if(n=="pH"){logaxis<-"T"} else {logaxis<-"F"}
>plot(full.age,raw[,n],type="n",ylog=logaxis)
>...
>}

What (probably) will work is:

if(n=="pH"){logaxis<-"Y"} else {logaxis<-""}
plot(full.age,raw[,n],type="n",log=logaxis)

The plot-argument log takes which axis that shuld be logaritmic. 


Morten




More information about the R-help mailing list