shift_values: Shift numeric values in a data frame by an amount 'eps'

shift_valuesR Documentation

Shift numeric values in a data frame by an amount eps

Description

Shift numeric values in a data frame by an amount eps

Usage

shift_values(df, h, i, FUN = `+`, focal = NULL)

Arguments

df

a data frame or tibble.

h

numeric; the amount to shift values in df by.

i

logical; a vector indexing columns of df that should not be included in the shift.

FUN

function; a function to applut the shift. Typically + or -.

focal

character; the focal variable when computing partial derivatives. This allows shifting only the focal variable by eps.


gratia documentation built on April 3, 2025, 11:42 p.m.