Hello, is't possible to get excerptions of data frame using some contstraints, something like q1 = q[q$V3<1] ? Regards, Oleg _____________________________________________________________ Oleg Bartunov, sci.researcher, hostmaster of AstroNet, Sternberg Astronomical Institute, Moscow University (Russia) Internet: oleg at sai.msu.su, http://www.sai.msu.su/~megera/ phone: +007(095)939-16-83, +007(095)939-23-83
data frame excerption
3 messages · Oleg Bartunov, Ales Ziberna, Uwe Ligges
Yes it is! you should write: q1 <- q[q$V3<1,] Since the data.frame has two indices, the first one indicating rows, which is what you need! Regards, Ales Ziberna ----- Original Message ----- From: "Oleg Bartunov" <oleg at sai.msu.su> To: "R-help" <R-help at stat.math.ethz.ch> Sent: Saturday, March 12, 2005 1:29 PM Subject: [R] data frame excerption
Hello, is't possible to get excerptions of data frame using some contstraints, something like q1 = q[q$V3<1] ? Regards, Oleg
_____________________________________________________________ Oleg Bartunov, sci.researcher, hostmaster of AstroNet, Sternberg Astronomical Institute, Moscow University (Russia) Internet: oleg at sai.msu.su, http://www.sai.msu.su/~megera/ phone: +007(095)939-16-83, +007(095)939-23-83 ______________________________________________ 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
Oleg Bartunov wrote:
Hello, is't possible to get excerptions of data frame using some contstraints, something like q1 = q[q$V3<1] ?
Yes, but you have to use the indexing matrix-like (see the manuals): q1 <- q[q$V3 < 1, ] Uwe Ligges
Regards,
Oleg
_____________________________________________________________ Oleg Bartunov, sci.researcher, hostmaster of AstroNet, Sternberg Astronomical Institute, Moscow University (Russia) Internet: oleg at sai.msu.su, http://www.sai.msu.su/~megera/ phone: +007(095)939-16-83, +007(095)939-23-83 ______________________________________________ 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