Skip to content

Instantly share code, notes, and snippets.

@keithmcnulty
Created July 16, 2020 11:32
Show Gist options
  • Select an option

  • Save keithmcnulty/6efc354eb4ff6810f936e8a84d6cfee6 to your computer and use it in GitHub Desktop.

Select an option

Save keithmcnulty/6efc354eb4ff6810f936e8a84d6cfee6 to your computer and use it in GitHub Desktop.
storms_sum %>%
tidyr::pivot_wider(names_from = "year", values_from = c("mean", "median"))
#> # A tibble: 3 x 7
#> status mean_1975 mean_1976 mean_1977 median_1975 median_1976 median_1977
#> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 hurricane 977. 975. 978. 984 975 987
#> 2 tropical de… 1011. 1007. 1011. 1012. 1006. 1010
#> 3 tropical st… 992. 995. 1002. 993 994. 1001
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment