View source: R/calcColumnDiffs.R
calcColumnDiffs | R Documentation |
Function to calculate differences between dataframe columns by row.
calcColumnDiffs(dfr, col, cols = NULL, adjacent = FALSE)
dfr |
|
col |
|
cols |
|
adjacent |
|
If cols
is NULL, then differences will be commputed 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 moves through those in cols
.
copy of input dataframe with extra columns representing column differences
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.