arrange_left: Function to arrange variables to the left of a data frame.

View source: R/arrange_left.R

arrange_leftR Documentation

Function to arrange variables to the left of a data frame.

Description

arrange_left is useful when some variables/columns want to be moved to the left-side of a data frame. arrange_left will silently skip variables if they do not have a match in names(df).

Usage

arrange_left(df, variable)

Arguments

df

Data frame which is to be transformed.

variable

Variable(s) to be moved to the left side of df.

Author(s)

Stuart K. Grange

Examples

## Not run: 

# Move a single variable to the first position
data_ozone <- arrange_left(data_ozone, "date")

# Move many variables to left hand side of data frame
data_ozone <- arrange_left(data_ozone, c("date", "site", "site_name", "sensor"))


## End(Not run)


skgrange/threadr documentation built on April 15, 2024, 9:35 p.m.