[R] if else lop
engstrom.gary at gmail.com
Tue Jul 5 22:27:41 CEST 2011
I am trying to use if...else loop and have included a code snippet which I
might like to expand.
Maybe you could steer me in the right direction.
a <- sample ( 1:4,100, replace=T,prob=c(0.1,0.2,0.5,0.3))
dd <- data.frame(a,b)
if (subset finds a vector) ( print that vector)
(else continue looking at subsets)
subset(dd,isin(dd,c(1,4), ordered = FALSE))
More information about the R-help