r - Subset data.frame to two sets of ranges for one variable -


i trying subset dataset , take out center range.

the data goes 0 150 subset , keep data 0-60 , 90-150.

how can that?

suppose data.frame named df:

df[df$dayssince %in% c(0:60,90:150),] 

remember selection or subset can takes account boolean vector. take in account here


Comments

Popular posts from this blog

Ansible warning on jinja2 braces on when -

Parsing a protocol message from Go by Java -

node.js - Node js - Trying to send POST request, but it is not loading javascript content -