Re: [R] User defined function's argument as Subset function's input

2009-09-04 Thread baptiste auguie
Hi, This may come close to what you want, x <- data.frame(ID=rep(letters[1:5],2), A1=rep(10:14,2), A2=rep(2:6,2), A3=c(101:105,95:99), A4=c(-60, rep(c(0, 3), length=9))) # basic conditions cond1 <- quote(ID == "a" & A2 >1) cond2 <- quote(A1 < 10) cond3 <- quote(A1 == 10) # note t

[R] User defined function's argument as Subset function's input

2009-09-03 Thread Steven Kang
Dear R users, I have a data where I desire to subset according to certain conditions. However, the script is very messy as there are about 30 distinct conditions. (i.e. same script but with different conditions) I would like to make a user defined function so that I can input the desired conditi