reduce_to_percentiles: Reduce multiple travel times to a set of percentile values

Description Usage Arguments Value See Also

View source: R/percentile.R

Description

Reduce multiple travel times to a set of percentile values

Usage

1
2
3
4
5
6
7
reduce_to_percentiles(x, percentiles = c(5, 25, 50, 75, 95))

## S3 method for class 'data.table'
reduce_to_percentiles(x, percentiles = c(5, 25, 50, 75, 95))

## S3 method for class 'stars'
reduce_to_percentiles(x, percentiles = c(5, 25, 50, 75, 95))

Arguments

x

Object to reduce. May be a travel time grid as object of class stars created by create_traveltime_grid() and having multiple travel time values per spatial location stored along a third dimension. May also be an object of class data.table created by multinet_traveltimes() and having multiple travel time columns with names starting with "travel_time".

percentiles

Percentile values that should be calculated.

Value

In case x is a travel time grid: the updated travel time grid as object of class stars, with the third dimension now having one coordinate per calculated percentile value. The original third dimension is removed.

In case x is a data table: the updated table having one travel time column per calculated percentile, all named "travel_time_p" followed by the corresponding percentile value. The original travel time columns are removed.

See Also

create_traveltime_grid(), multinet_traveltimes()


triply-at/gtfsmulti documentation built on Dec. 24, 2021, 1:21 a.m.