[R] Subset data

2012-08-03 Thread antonio.bso...@sapo.pt
Thanks to all The problem is fixed. What happened is that i was using the epicalc library and this way the program didn´t find the var edad11. Switching off epicalc everything is all rigth. Thanks again Antonio Sousa __ R-help@r-project.org mailing list

[R] Subset data

2012-08-02 Thread antonio.bso...@sapo.pt
Hi Need a little help. This is easy question, but i´m new to R. I want to subset a data frame called vef1 using a variable that is a factor called edad11, 0 if under 11 years, 1 otherwise. I tried: vef1.sub<-subset(vef1, edad11==0) The code runs correctly but i get a empty dataframe. If i use thi