Learn R Programming

tsibble (version 0.1.5)

summarise.tbl_ts: Collapse multiple rows to a single value

Description

Collapse multiple rows to a single value

Usage

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

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

Arguments

.data

A tsibble.

...

Name-value pairs of expressions.

drop

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

Details

Time index will not be collapsed by summarise.tbl_ts.

See Also

dplyr::summarise

dplyr::summarize

Examples

Run this code
# NOT RUN {
pedestrian %>% 
  summarise(Total = sum(Count))
## drop = TRUE ----
pedestrian %>% 
  summarise(Total = sum(Count), drop = TRUE)
# }

Run the code above in your browser using DataLab