View source: R/calcColumnDiffs.R
calcColumnDiffs | R Documentation |
Function to calculate differences between dataframe columns by row.
calcColumnDiffs(
dfr,
col,
cols = NULL,
adjacent = FALSE,
dropCols = TRUE,
dropBase = FALSE
)
dfr |
|
col |
|
cols |
|
adjacent |
|
dropCols |
|
dropBase |
|
If cols
is NULL, then differences will be computed as if cols
was
the vector of names of columns to the "right" of col
. If adjacent=FALSE
,
then all differences are relative to col
as the base. Otherwise, after the
first difference, the base column is sequentially moved through those in cols
.
copy of input dataframe, with columns inv with extra columns representing column differences
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.