proximity: Proximity accessibility indicator

Description Usage Arguments Details Value

View source: R/proximity.R

Description

proximity uses origin-destination matrix to calculate proximity indicator

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
proximity(
  OD,
  or,
  ttime,
  dest = "",
  pattern = " - ",
  destinations,
  destinations_id = "",
  or_dest = TRUE,
  zero = TRUE
)

Arguments

OD

data.table with origin-destination matrix

or

column in OD that contains ids of origins or both, origin and destination ids

ttime

column in OD that contains travel time or distance

dest

optional column in OD that contains ids of destinations. It is ommited , if or contains origin and destination ids.

pattern

optional a pattern used to split name into origin and destination column. Default: " - "

destinations

optional dataset of available destinations. If not specified, all available destinatinos from OD dataset are used. Accepted data formats: tibble, data.table, data.frame or sf object.

destinations_id

optional column in destinatinos with ids of available destinations

or_dest

a bolean argument. When TRUE, it excludes trips where origin has the same ID as destination. Default: TRUE

zero

a bolean argument. When TRUE it excludes trips of zero length. Default: TRUE

Details

proximity() calculates (selects) travel time (or distance) to the closests destination out of all available ones. It can select any destination of all available within OD dataset or to destination available in separate dataset (using join). Additional parameters enable to exclude OD pairs where origin and destination have the same ID or a measured time is equal to zero.

Value

a data.table object with distance / travel time to the nearest destination


stmarcin/traccR documentation built on June 4, 2020, 5:06 p.m.