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

My HTML document is not linking to my CSS stylesheet properly -

php array slice every 2th rule -

node.js - Sending sockets to client side, Error: Converting circular structure to JSON -