select: Select variables by name on xts

Description Usage Arguments Value Examples

Description

Select variables by name on xts

Usage

1
2
## S3 method for class 'xts'
select(.data, ...)

Arguments

.data

an xts object

...

One or more unquoted expressions separated by commas. You can treat variable names like they are positions.

Positive values select variables; negative values to drop variables. If the first expression is negative, 'select()' will automatically start with all variables.

Use named arguments to rename selected variables.

These arguments are automatically [quoted][rlang::quo] and [evaluated][rlang::eval_tidy] in a context where column names represent column positions. They support [unquoting][rlang::quasiquotation] and splicing. See 'vignette("programming")' for an introduction to these concepts.

Value

a xts

Examples

1
2
3
4
library(xts)
data(sample_matrix)
sample.xts <- as.xts(sample_matrix, descr='my new xts object')
sample.xts %>% select(Open,Close)

ThinkR-open/tidyxts documentation built on May 19, 2019, 10:48 p.m.