A dataset named "rain" contains information on raining in four different countries. How to create a subset of the data that only contain raining information when "country" is 1?
1 Answer
$\begingroup$
$\endgroup$
To subset your dataset, assuming it is a dataframe, you can use
rain1 <- rain[rain$country == 1, ]
Programming questions are better suited to stackoverflow by the way.