Let’s keep only the three counties with the most observations: Sonoma, Los Angeles, and Kern. Create a conditional called bigCounties that is TRUE if the variable county is any of these three counties. Remember that | is the or logical operator.
UPDATE
bigCounties <- isTRUE( CASchools$county == "Sonoma" | CASchools$county == "Los Angeles"|CASchools$county == "Kern")
summary(bigCounties)
OUTPUT:
Mode FALSE
logical 1
How do I get it to run through the entire dataset?