Learn R Programming

tidyr (version 0.5.1)

gather_: Gather (standard-evaluation).

Description

This is a S3 generic.

Usage

gather_(data, key_col, value_col, gather_cols, na.rm = FALSE, convert = FALSE, factor_key = FALSE)

Arguments

data
A data frame
key_col, value_col
Strings giving names of key and value columns to create.
gather_cols
Character vector giving column names to be gathered into pair of key-value columns.
na.rm
If TRUE, will remove rows from output where the value column in NA.
convert
If TRUE will automatically run type.convert on the key column. This is useful if the column names are actually numeric, integer, or logical.
factor_key
If FALSE, the default, the key values will be stored as a character vector. If TRUE, will be stored as a factor, which preserves the original ordering of the columns.