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

python - Selenium remoteWebDriver (& SauceLabs) Firefox moseMoveTo action exception -

html - How to custom Bootstrap grid height? -

Ansible warning on jinja2 braces on when -