select()
selects columns by variables; mutate()
adds new variables;
summarise()
collapses the rows by variables.
# S3 method for tbl_ts
select(.data, ..., drop = FALSE)# S3 method for tbl_ts
rename(.data, ...)
# S3 method for tbl_ts
mutate(.data, ..., drop = FALSE)
# S3 method for tbl_ts
summarise(.data, ..., drop = FALSE)
# S3 method for tbl_ts
summarize(.data, ..., drop = FALSE)
A tsibble.
A set of name-value pairs of expressions.
FALSE
returns a tsibble object as the input. TRUE
drops a
tsibble and returns a tibble.
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.
summarise()
will not collapse on the index variable.