findXYRow | R Documentation |
Used for the ggbootPW
function, where it may be desired
that the variables are put in a specific order along the x and y-axis.
Finds the row in a dataframe corresponding to a specific 'x' and 'y' combination,
but where the elements that should be in 'x' may be in 'y', and vice versa. It
returns that row, with the elements swopped around if need be. If the elements are swopped,
the column labelled 'origStat' is multiplied by -1.
findXYRow(yVar, xVar, plotTbl)
xVar, yVar |
numeric/character. Elements to set as 'x' and 'y' variables, respectively. |
plotTbl |
dataframe. Dataframe with columns x, y and origStat. May have other columns.
The combination |
Row of dataframe as a dataframe.
findXYRow( 1, 2, data.frame(x = c( 3, 1, 1 ),
y = c( 2, 2, 1 ),
origStat = c( 0.5, 0.3, -0.2 ) ) )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.