[R] mplot :how to deal with missing data

Christoph Buser buser at stat.math.ethz.ch
Fri Jun 3 08:26:06 CEST 2005


If you have to deal with missing values, you might be interested
in na.omit().
?na.omit

Regards,

Christoph

--------------------------------------------------------------
Christoph Buser <buser at stat.math.ethz.ch>
Seminar fuer Statistik, LEO C13
ETH (Federal Inst. Technology)	8092 Zurich	 SWITZERLAND
phone: x-41-44-632-4673		fax: 632-1228
http://stat.ethz.ch/~buser/
--------------------------------------------------------------


NATALIA F TCHETCHERINA writes:
 > Hello all,
 > I have  data:
 > 
 >            Genes   time rep vart dye         y trt
 > 130911   sa1-d07 030min   1  col   g  9.636244   o
 > 145771   sa1-d07 030min   1  col   r  8.107577   c
 > 93335    sa1-d07 030min   1  ler   g  7.409566   o
 > 94821    sa1-d07 030min   1  ler   r  5.107160   c
 > 10119101 sa1-d07 030min   2  col   g  8.336862   o
 > 11605101 sa1-d07 030min   2  col   r  7.824530   c
 > 725313   sa1-d07 030min   2  ler   g  8.249347   o
 > 740171   sa1-d07 030min   2  ler   r  7.565084   c
 > 1160522  sa1-d07 030min   3  col   g        NA   c
 > 1011922  sa1-d07 030min   3  col   r        NA   o
 > 562232   sa1-d07 030min   3  ler   g  9.974227   c
 > 547362   sa1-d07 030min   3  ler   r 10.341149   o
 > ..................................................
 > ..................................................
 > ..................................................
 > 
 > I would like to get graphs means for two-way factor combinations
 > I used Rlab package:
 > > mplot(data$y[which(data$Genes==sa1-d07)],
 > data$time[which(data$Genes==sa1-d07)], data$trt[which(data$Genes==sa1-d07)])
 > 
 > However, I have the following error message:
 > 
 > plot window will lay out plots in a 3 by 1 matrix 
 > Error in plot.window(xlim, ylim, log, asp, ...) : 
 >         need finite 'ylim' values
 > In addition: Warning messages:
 > 1: no finite arguments to min; returning Inf 
 > 2: no finite arguments to max; returning -Inf 
 > > 
 > I think this is because of some y='NA'.
 > My question is: how I can deal with this problem?
 > 
 > Sincerely, Natalia.
 > 
 > ______________________________________________
 > R-help at stat.math.ethz.ch mailing list
 > https://stat.ethz.ch/mailman/listinfo/r-help
 > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html




More information about the R-help mailing list