0

I'm currently working with dplyr and struggling to subset variables based on specific data.

I need to subset the iris data to contain only the species virginica, and within that, they should all have a sepal length of more than 6.

I've tried the filter and select function and am getting nowhere as they want numeric values while I'm working with words.

zx8754
  • 52,746
  • 12
  • 114
  • 209
  • 3
    Doen't this work? `iris %>% filter(Species == "virginica" & Sepal.Length > 6)` – DatamineR May 04 '16 at 10:21
  • Welcome to Stack Overflow! Please read the info about [how to ask a good question](http://stackoverflow.com/help/how-to-ask) and how to give a [reproducible example](http://stackoverflow.com/questions/5963269). This will make it much easier for others to help you. – zx8754 May 04 '16 at 11:20
  • 1
    Please provide your code, even if it doesn't work. – zx8754 May 04 '16 at 11:21
  • Possible duplicate of [Filtering row which contains a certain string using dplyr](http://stackoverflow.com/questions/22850026/filtering-row-which-contains-a-certain-string-using-dplyr) – AllanT May 04 '16 at 17:31
  • thanks, that code has worked great! – Ashleigh Howe May 05 '16 at 17:36

0 Answers0