Description Usage Arguments Value Author(s) See Also Examples
Takes a data frame and two character strings. The character strings must match exactly to the column names of two columns in the data frame. The returned value is the same data frame, but with the column positions of the two columns named interchanged.
1 | swap_columns(XX, column_name_01, column_name_02)
|
XX |
data.frame with two or more columns. |
column_name_01 |
character string with the name of first column. |
column_name_02 |
character string with the name of first column. |
a data.frame with the two named columns interchanged.
Bill Forrest forrest@gene.com
1 2 3 | ### avoid a ':::'-related warning in package check by not running next lines:
dat <- data.frame( A = letters[1:10], X = 1:10, Y = rnorm( 10 ) )
dat_swap <- maeve:::swap_columns( dat, 'X', 'Y' )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.