Learn R Programming

eatGADS (version 1.0.0)

insertVariable: Reorder a single variable in a GADSdat.

Description

Reorder a single variables in a GADSdat. The variable (var) can be inserted right after another variable (varBefore).

Usage

insertVariable(GADSdat, var, varBefore)

Value

Returns a GADSdat object.

Arguments

GADSdat

A GADSdat object.

var

Character string of the variable name which should be sorted.

varBefore

Character string of the variable name which should be followed by var.

Details

The variables in the dat and in the labels section are ordered. For reordering the whole GADSdat, see orderLike.

Examples

Run this code
pisa2 <- insertVariable(pisa, var = "migration", varBefore = "idclass")

Run the code above in your browser using DataLab