Data Science Desktop Survival Guide
by Graham Williams |
|||||
Comparing Distributions |
# Summarise subset of variables for observations with rainfall.
weatherAUS %>% select(MinTemp, MaxTemp, Rainfall, Sunshine) %>% filter(Rainfall >= 1) %>% summary()
It could be useful to contrast this with a base::summary() of those observations where there was virtually no rain. |
# Summarise observations with little or no rainfall.
weatherAUS %>% select(MinTemp, MaxTemp, Rainfall, Sunshine) %>% filter(Rainfall < 1) %>% summary()
Any number of functions can be included in a pipeline to achieve the results we desire. In the following chapters we will see many examples and some will string together ten or more functions. Each step along the way is of itself generally easily understandable. The power is in what we can achieve by stringing together many simple steps to produce something more complex. |