r - Subset rows which have a column inside numeral interval -


i subset lines have "chr" column 1 29, in "cnv1" dataframe.

i tried it:

cnvk <- cnv1[cnv1$chr==1:29,] 

but not lines have 1,2,3...29.

cheers!

try

cnvk <- cnv1[cnv1$chr %in% 1:29,] 

or

cnvk <- cnv1[cnv1$chr>=1 & cnv1$chr<=29,] 

(the latter might quicker if you're checking against large range of values)


Comments

Popular posts from this blog

How to access named pipes using JavaScript in Firefox add-on? -

multithreading - OPAL (Open Phone Abstraction Library) Transport not terminated when reattaching thread? -

node.js - req param returns an empty array -