Learn R Programming

scan (version 0.53)

shift: Shift values in a single-case data file

Description

Shifting the values might be helpful in cases where the measurement time is given as a time variable (see example below).

Usage

shift(data, value, var)

shiftSC(...)

Arguments

data

A single-case data frame. See scdf to learn about this format.

value

Number by which to shift the values

var

Character string with the name of the target variable. Defaults to the measurement time variable.

...

Further arguments passed to the function.

Value

A scdf with shifted data

See Also

Other data manipulation functions: as.data.frame.scdf(), fill_missing(), outlier(), ranks(), smooth_cases(), standardize(), truncate_phase()

Examples

Run this code
# NOT RUN {
### Shift the measurement time for a better estimation of the intercept
ex <- shift(example_A24, value = -1996)
plm(ex)
# }

Run the code above in your browser using DataLab