Re: [R] Logical vector-based extraction

2012-11-03 Thread jim holtman
works fine for me creating: > state_pflt200 <- df$p_fatal <200 > df[state_pflt200, c("state.name","p_fatal")] [1] state.name p_fatal <0 rows> (or 0-length row.names) > considering that there were no values less than 200 in your data, the result is correct. So what is the problem? On Sat, Nov 3

[R] Logical vector-based extraction

2012-11-03 Thread Muhuri, Pradip (SAMHSA/CBHSQ)
Hello, The most part of the program works except that the following logical variable does not get created although the second logical variable-based extraction works. I don't understand what I am doing wrong here. state_pflt200 <- df$p_fatal <200 df[state_pflt200, c("state.name","p_fatal")]