0
$\begingroup$

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?

$\endgroup$

1 Answer 1

2
$\begingroup$

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.

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.