reorderColumns {clinUtils}R Documentation

Function for reordering columns

Description

Function for reordering columns

Usage

reorderColumns(data, vars)

Arguments

data

A data.frame

vars

Named vector indicating the position in the data frame of the specified variable

Value

The same data.frame specified in data, with ordered columns.

Examples

someData <- data.frame(
	"Col1" = c(1, 2),
	"Col2" = c(2, 3),
	"Col3" = c(3, 4)
	)
reorderColumns(
	data = someData,
	vars = c("Col3" = 1)
	)

[Package clinUtils version 0.1.4 Index]