select {linq} R Documentation

Keep or drop columns using their names and types

Description


Select (and optionally rename) variables in a data frame, using a
concise mini-language that makes it easy to refer to variables
based on their name (e.g. a:f selects all columns from a on the
left to f on the right) or type (e.g. where(is.numeric) selects all
numeric columns).

Usage

select(.data,
    strict = TRUE,
    ... = NULL);

Arguments

.data

A data frame, data frame extension (e.g. a tibble), or a lazy data frame (e.g. from dbplyr or dtplyr). See Methods, below, for more details. [as dataframe]

selectors

One or more unquoted expressions separated by commas. Variable names can be used as if they were positions in the data frame, so expressions like x:y can be used to select a range of variables. syntax for the selectors: 1. select by name: select(name1, name2) 2. field renames: select(name1 -> data1). [as list]

strict

By default when this function running in strict mode, an error message will be returned if there is a missing data fields exists in the selector list. [as boolean]

env

[as Environment]

Details

Authors

SMRUCC genomics Institute

Value

An object of the same type as .data. The output has the following properties:

1. Rows are Not affected. 2. Output columns are a subset Of input columns, potentially With a different order. Columns will be renamed If newname = oldname form Is used. 3. Data frame attributes are preserved. 4. Groups are maintained; you can't select off grouping variables.

clr value class

Examples


[Package linq version 2.33.856.6961 Index]