Re: [R] subsetting from a vector or matrix

2009-09-25 Thread andrew
both the following will probably do the trick. ?subset ?[ Basically on the second one, you want to come down to something that looks like x[L] where x is a matrix/vector, and L is a logical vector that has the same dimension as x, but is TRUE on the values of x that you want to select. for

[R] subsetting from a vector or matrix

2009-09-24 Thread Jim Bouldin
I realize this should be simple but I'm having trouble subsetting vectors and matrices, for example extracting all values meeting a certain criterion, from a vector. Cannot seem to figure out the correct syntax and help page not very helpful. Or should I be using some other function than subset.