To combine multiple conditions to subset a data frame using ‘OR’, use the following:

my.data27.frame <- subset(data , V1 > 2 | V2 < 4)

Skip to main content

### Where am I?

Question

how to use subset in r?

In answerQA you can ask and answer questions and share your experience with others!

To combine multiple conditions to subset a data frame using ‘OR’, use the following:

my.data27.frame <- subset(data , V1 > 2 | V2 < 4)