Description Usage Arguments Examples
Swaps values of two variables on a dataframe. Takes an optional index.
1 2 | ## S3 method for class 'data.frame'
value_swap(x, .svp, .swp, .idx = NULL, ...)
|
x |
A dataframe. |
.svp |
The name of the first variable involved in the value swap. |
.swp |
The name of the second variable involved in the value swap. |
.idx |
An optional row index. If ommitted all values are swapped between variables. |
... |
Arguments passed on to other methods. |
1 2 3 4 5 6 7 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.