In R, type the subset() call that keeps orders from ON or QC with amount over 300.
In R, type the subset() call that keeps orders from ON or QC with amount over 300.
Answer
subset(orders, prov %in% c("ON", "QC") & amount > 300)
%in% is "is one of"; & joins the two conditions. Four rows, all ON. Never prov == c("ON", "QC") — that recycles.