uts_gen_yearly_seasonal_avg: Utilities for climate analysis and data reforming

Description Usage Arguments Details Value Examples

View source: R/uts_climate.R

Description

"Widens" monthly long form data form and calculates

Usage

1

Arguments

data

A data frame with monthly "count" in long format

season

Logical. If TRUE, the default, seasonal mean will be calculated

Details

The input data frame must have the column names

City, Measure, Year_Month, Year and count

and can be also a tibble or tsibble.

Value

data frame and tibble (not a tsibble), e.g.:
A tibble: 10 x 8 Groups: City, Measure [2] # here: Measure = Temperature and Precipitation City Measure Year Winter_avg Spring_avg Summer_avg Fall_avg Year_avg
<chr> <fct> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>

Examples

1
2
3
4
5
# Temperature and Precipitation data of "Basel" w/o NAs rsp. Giessen w/ NAs
uts_gen_yearly_seasonal_avg(monthly_climate_basel)
uts_gen_yearly_seasonal_avg(monthly_climate_giessen)  # w/ NAs
# note: NAs of Winter_avg does not impact Year_avg if this
# NA is caused by December value of previous year

WoVollmer/pkgTS documentation built on June 2, 2021, 4:02 a.m.