I am working with the dataset `LearnBayes`. For those that want to see the actual data: install.packages('LearnBayes')I am trying to filter out rows based on the value in the columns. For example, if the column value is "water", then I want that row. If the column value is "milk", then I don't want it. Ultimately, I am trying to filter out all individuals who's Drink column is "water".
I would download dplyr package and use the filter function which takes a data frame and a logical test. For your example, I would type the filter(LearnBayes, Drink == water).