dplyr gives you a small set of verbs for tables. Each takes a data frame first and returns a new one. filter() keeps the rows where a condition is TRUE: filter(orders, region == "North").
You will usually write it with the pipe, orders |> filter(region == "North"), which reads as "take orders, then filter". The next lessons use it everywhere.
Test equality with ==; a single = names an argument and gives an error. Separate conditions with commas when all must hold, or join them with &. Use | when either may hold. To match any of several values, use %in%: category %in% c("Tents", "Packs"). Text must match exactly, including capitals.
filter() never changes orders itself. Assign the result to keep it.
One condition, two conditions that must both hold, and a match against a set of values.