[R] log axis assignment

Jeremy Z Butler jerrytheshrub at hotmail.com
Tue Mar 4 05:58:02 CET 2003


Hi again,
another problem:

This (below) isn't working and as far as I can see it damn well should. What 
I'm trying to acomplish is to run several data sets through the same 
graphing procedure, but for the pH data use a log y axis. using this code 
all graphs are drawn with a linear axis. 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)
...
}

Any ideas what I'm doing wrong? I assume its something to do with the ylog 
(and xlog) options being read-only but I'm not sure what that means.
J




More information about the R-help mailing list