shift_column: shift_column

View source: R/utils.R

shift_columnR Documentation

shift_column

Description

Port of shift.column() from Jared Lander's useful package with a few minor changes.

Usage

shift_column(
  data,
  columns,
  new_names = sprintf("%s.Shifted", columns),
  len = 1L,
  up = TRUE
)

Arguments

data

data

columns

columns to shift over

new_names

New name of shifted columns, Default: sprintf("%s.Shifted", columns)

len

length of rows to shift, Default: 1

up

shift rows up (TRUE) or down (FALSE), Default: TRUE

Value

data.frame with shifted columns


abhiamishra/ggshakeR documentation built on Aug. 19, 2023, 2 p.m.