[R] lapply & subset
christian schulz
ozric at web.de
Tue Feb 26 14:45:08 CET 2002
hello,
how is it possible ( perhaps with lapply )
modifiy this so that Q31.1 would be replaced with a loop which
select first column than second column, n column.........from configData
etc.
x <- subset(configData, Q71 == 1 & Q31.1 ==1 , select = Q31.1)
(dim(x)[1]/dim(configData)[1])*100
PseudoCode !?
for i in 1:ncol(configData) {
x <- subset(configData, Q71 == 1 & i ==1 , select = i)
(dim(x)[1]/dim(configData)[1])*100
}
thanks for advance & regards,
Christian
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list