aggregate_by_time: A simple wrapper for aggregate function. Aggregates...

Description Usage Arguments Value

View source: R/aggregate_by_time.R

Description

A simple wrapper for aggregate function. Aggregates timeseries to new chosen timestep

Usage

1
aggregate_by_time(file, columns, timestep, FUN, right = TRUE)

Arguments

file

a data frame, matrix or array containing one column with POSIXct formated DateTime objects

columns

integer or vector for the columns to be aggregated

timestep

time format of the output. F.e. "1 hour", "5 min", "1 month", "1 weeKk

FUN

Function applied for aggregation (mean, sum,...) na.rm as default within function

right

= TRUE by default. Takes the values of the hour before for the function. F.e. Precipitation value at 18:00 means sum of values 17:00-18:00 when right = TRUE otherwise 18:00 = sum of 18:00-19:00

Value

returns the file with choosen timly resolution (timestep)


plvoit/PaulsPack documentation built on Dec. 15, 2019, 10:24 p.m.