[R] unable to force the vector format

Ido M. Tamir tamir at imp.univie.ac.at
Wed Dec 14 15:01:37 CET 2005


> slides <- read.table("slides.txt")
> slides [1:5,]
            V1    V2     V3     V4     V5     V6     V7     V8
1 PLB00090AA02 0.147  0.018  0.046  0.064 -0.018 -0.008 -0.063
2 PLB00090BC08 0.171  0.011 -0.001  0.009  0.052  0.032 -0.065
3 PLB00090CG02 0.029 -0.014 -0.042  0.006  0.024 -0.009 -0.043
4 PLB00091AA08 0.033  0.050 -0.022 -0.002  0.038  0.015 -0.037
5 PLB00091BE02 0.183  0.039  0.052 -0.014 -0.034 -0.037  0.037

maybe:
slides$mean <- apply( slides[,2:8],1,mean)
close <- abs(slides$mean) < 0.03
slides[close,]

best wishes
ido




More information about the R-help mailing list