View source: R/relocateVariable.R
relocateVariable | R Documentation |
GADSdat
.Reorder a single variable in a GADSdat
. The variable (var
) can be inserted right after another variable (after
) or at the beginning
of the GADSdat
via after = NULL
.
relocateVariable(GADSdat, var, after = NULL)
GADSdat |
A |
var |
Character string of the variable name which should be sorted. |
after |
Character string of the variable name after which |
The variables in the dat
and in the labels
section are ordered. For reordering the whole GADSdat
, see
orderLike
.
Returns a GADSdat
object.
# Insert variable 'migration' after variable 'idclass'
pisa2 <- relocateVariable(pisa, var = "migration", after = "idclass")
# Insert variable 'idclass' at the beginning of the data set
pisa2 <- relocateVariable(pisa, var = "idclass", after = NULL)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.