We will use the iris database:
x <- iris[which(iris[,5] != "setosa"), c(1,5)] summary(x)
## Sepal.Length Species ## Min. :4.900 setosa : 0 ## 1st Qu.:5.800 versicolor:50 ## Median :6.300 virginica :50 ## Mean :6.262 ## 3rd Qu.:6.700 ## Max. :7.900
Example adapted from: https://unc-libraries-data.github.io/R-Open-Labs/Extras/Parallel/foreach.html