putColsFirst: Rearrange columns to put some columns to far left

Description Usage Arguments Value Author(s) Examples

View source: R/dfmat.R

Description

This function is helpful to export tables where certain columns are desired to be placed to the most left of the data.frame

Usage

1

Arguments

data.frame

Data.frame

columns

Character vector, names of columns which are to be put to the left

Value

data.frame with re-arranged columns

Author(s)

Jitao David Zhang <jitao_david.zhang@roche.com>

Examples

1
2
3
4
clubs <- data.frame(Points=c(21,23,28,24), Name=c("BVB", "FCB", "HSV",
"FCK"), games=c(12,11,11,12))
putColsFirst(clubs, c("Name"))
putColsFirst(clubs, c("Name", "games"))

ribiosUtils documentation built on March 13, 2020, 2:54 a.m.