Description Usage Arguments Examples
View source: R/wind_functions2.R
The output of tidy is always a data.frame. It is therefore suited for further manipulation by packages like dplyr, reshape2, ggplot2 and ggvis.
1 2 3 4 |
x |
An object to be converted into a tidy data.frame |
... |
extra arguments |
1 2 3 4 5 6 7 8 9 10 11 12 13 | data(wind.series)
df <- tidy(wind.series)
head(df)
## Not run:
# use the tidyverse
library(dplyr)
mean_speed <- tidy(wind.series) %>%
group_by(lat, lon) %>%
summarise(speed = mean(speed))
wind_average2 <- wind.mean(wind.series)
all.equal(wind_average2$speed, mean_speed$speed)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.