resample_meteo_h2d: Resample a data.frame with meteorological data with hourly...

Description Usage Arguments Value See Also

View source: R/meteo_utils.r

Description

Resample a data.frame with meteorological data with hourly interval to a daily interval, allowing the specification at which time to cut the day (e.g. can be summarized foro noon to noon).

Usage

1
2
3
4
5
6
7
8
9
resample_meteo_h2d(
  h,
  time_h = 24,
  timevar,
  varnames,
  aggregation = c("sample", "sum", "mean", "max", "min"),
  na.rm = F,
  add_suffix = F
)

Arguments

h

a data.frame holding the hourly data

time_h

hour value at which to cut the hourly data.frame to build summaries (e.g. 12 for noon to noon). Defaults to 24.

timevar

name of the column holding the date-time information (in POSIX numeric format).

varnames

character vector holding the names of the columns holding the variables to be processed.

aggregation

character vector holding the types of aggregations to perform on the selected variables.

na.rm

boolean to specify if aggregation function should consider or skip NA's.

add_suffix

boolean to specify if the vairable names sohould be completed with the specification of the aggregation.

Value

a new data.frame with daily timestep and the selected variables and aggregations .

See Also

kfold


pezzacolori/boris-r-misc documentation built on Sept. 14, 2021, 1:46 a.m.