dts_complete: Completes a data time series

View source: R/complete.R

dts_completeR Documentation

Completes a data time series

Description

Completes a data time series

Usage

dts_complete(
  x,
  dtt = "DateTime",
  colname = dts_colnames(x),
  from = min(x[[dtt]]),
  to = max(x[[dtt]]),
  floor = TRUE,
  unique = TRUE,
  sort = TRUE,
  units = dttr2::dtt_units(x[[dtt]]),
  .dts_fun = mean,
  ...
)

Arguments

x

A date/time vector.

dtt

A string specifying the column with the Date or POSIXct values.

colname

A character vector specifying the column(s) with the other values.

from

A date/time scalar of the start.

to

A date/time scalar of the end.

floor

A flag indicating whether to floor the values.

unique

A flag specifying whether to only return unique values.

sort

A flag specifying whether to sort the vector.

units

A string of the time units. The possible values are "secs", "minutes", "hours", "days" or "weeks".

.dts_fun

A function which returns a scalar.

...

Unused.

Value

The completed data time series.

Examples

dts_complete(dts_data[c(1,3),])

poissonconsulting/dts documentation built on March 10, 2024, 6:21 a.m.