Conditional array indexing in R
July 23, 2010
ts1[ts1[,6]>0,]
selects all rows of matrix “ts1″ that in column 6 have a value greater than zero. Don’t forget the very last comma!
Thoughts, tips and rants from a professional programmer
ts1[ts1[,6]>0,]
selects all rows of matrix “ts1″ that in column 6 have a value greater than zero. Don’t forget the very last comma!