pad_column: "Pad" a range aroun the values of a column

Description Usage Arguments Details

View source: R/dynpan.R

Description

(Vertically) expand a data.frame or data.table by adding an interval of values around every value in a column.

Usage

1
pad_column(dt, col, times, lag.name = NULL)

Arguments

dt

data.table to pad column in

col

column to pad

times

sequence of values to perturb col by

lag.name

name to use for column with times values in in the resulting data.table, NULL (default) to not include such a column

Details

Useful for constructing a data.table containing all points "around" the values in dt. For example, by applying pad_column to a time column one adds time points around those in dt.


rossklin/dynpan documentation built on May 27, 2019, 11:39 p.m.