move_front: Move columns to the front of a data.frame

Description Usage Arguments Examples

View source: R/utils.R

Description

This function is taken from daattali/rsalad R package.

Usage

1
move_front(df, cols)

Arguments

df

A data.frame.

cols

A vector of column names to move to the front.

Examples

1
2
3
df <- data.frame(a = character(0), b = character(0), c = character(0))
move_front(df, "b")
move_front(df, c("c", "b"))

Example output

Attaching package: 'ddpcr'

The following object is masked from 'package:stats':

    step

[1] b a c
<0 rows> (or 0-length row.names)
[1] c b a
<0 rows> (or 0-length row.names)

ddpcr documentation built on May 27, 2018, 5:05 p.m.