group_datetime: Group DateTime by user defined period (year, month, day,...

View source: R/group_datetime.R

group_datetimeR Documentation

Group DateTime by user defined period (year, month, day, hour, minute)

Description

Group DateTime by user defined period (year, month, day, hour, minute)

Usage

group_datetime(
  df,
  by = 600,
  fun = "stats::median",
  col_datetime = "DateTime",
  col_datatype = "DataType",
  dbg = TRUE
)

Arguments

df

a data frame as retrieved by import_data_haridwar()

by

an aggregation time step in seconds (default: 600 seconds) for intra- day aggregation or "day", "month" or "year" for longer time spans

fun

function to be used for grouping measurement data of column ParameterValue (default: stats::median) (default: kwb.pilot:::package_file("shiny/haridwar/.my.cnf"))

col_datetime

column name of datetime column (default: DateTime)

col_datatype

column name of data type column (default: DataType)

dbg

print debug information

Value

returns data frame with data aggregated according to user defined aggregation time step


KWB-R/kwb.pilot documentation built on Nov. 1, 2022, 2:49 p.m.