fortify.col: Create a fortified simply dataframe with two columns: date...

Description Usage Arguments Value Author(s)

View source: R/basicUtils.R

Description

Create a fortified simply dataframe with two columns: date and value.

Usage

1
fortify.col(df, fInterval = NULL, by)

Arguments

df

dataframe with a column "dates" in POSIXct format an another column with any value type.

fInterval

a 2-item vector with 'start' and 'end' POSIXct dates respectively. All the values in the given interval will be explicitdly included in the resulting dataframe with NAs. By default the limit dates are extracted from the data.

by

a character string, containing the data increment in terms of "sec", "min", "hour", "day", "DSTday", "week", "month", "quarter" or "year". This can optionally be preceded by a (positive or negative) integer and a space, or followed by "s". See seq.POSIXt for more info. The increment provided must equivalent to the real data-time increment.

Value

A fortified dataframe, i.e with all the lost values explicited. The resulting time index its perfectly defined by seq{start,end,by}, so the dataframes created with this function will have the exactly same index.

Author(s)

JV Yago


VicenteYago/sensorsUtils documentation built on Jan. 29, 2022, 12:44 a.m.