dts_bound: Bound

View source: R/bound.R

dts_boundR Documentation

Bound

Description

Values outside the bounds are set to missing values.

Usage

dts_bound(
  x,
  dtt = "DateTime",
  colname = "Value",
  bounds = c(-Inf, Inf),
  adjust = FALSE
)

Arguments

x

A dts data frame

dtt

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

colname

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

bounds

A sorted double vector of the lower and upper permitted bounds.

adjust

A flag indicating whether to adjust values outside the bounds to the permitted bounds or whether to set to NA (the default).

Value

A data frame

Examples

dts_bound(dts_data[1:5,], bounds = c(0,Inf))

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