Learn R Programming

tsibble (version 0.2.0)

select.tbl_ts: Select/rename variables by name

Description

Select/rename variables by name

Usage

# S3 method for tbl_ts
select(.data, ..., .drop = FALSE)

# S3 method for tbl_ts rename(.data, ...)

Arguments

.data

A tsibble.

...

Unquoted variable names separated by commas. rename() requires named arguments.

.drop

FALSE returns a tsibble object as the input. TRUE drops a tsibble and returns a tibble.

Details

These column-wise verbs from dplyr have an additional argument of .drop = FALSE for tsibble. The index variable cannot be dropped for a tsibble. If any key variable is changed, it will validate whether it's a tsibble internally. Turning .drop = TRUE converts to a tibble first and then do the operations.

See Also

dplyr::select

dplyr::rename