[R-sig-Finance] How to get values from dataframe's column conditional on other column
Yuri Volchik
volchik2000 at list.ru
Tue Jun 13 13:35:36 CEST 2006
Hi to all members of this list,
I'm quite a novice to R and was wondering if there is a more elegant
way to solve a following problem:
Suppose we have a dataframe
X Y
.12 TRUE
-.24 TRUE
.. ...
.34 FALSE
i.e. two (or more columns) with data and we want to get vector of X
values conditional on Y values (say only X's when Y=TRUE).
Of course it is possible to do it by looping through the whole
dataframe, i was wondering if there is a a more elegant solution to
this in R?
--
Best regards,
Yuri mailto:volchik2000 at list.ru
More information about the R-SIG-Finance
mailing list