flightCountMatrixToConnectionList: Convert flight counts to connection list

View source: R/data_flights.R

flightCountMatrixToConnectionListR Documentation

Convert flight counts to connection list

Description

Convert a numeric matrix containing flight counts between airports to a data frame containing a list of connections.

Usage

flightCountMatrixToConnectionList(nFlightsPerConnection, directed = TRUE)

Arguments

nFlightsPerConnection

A square, numeric matrix with identical column- and row-names. Each entry represents the number of flights from the airport indexing the row to the airport indexing the column in some arbitrary time period.

directed

Logical scalar. Whether flights A->B and B->A should be considered separately.

Value

A data frame with columns departureAirport, arrivalAirport, nFlights. Each row represents one connection with >=1 flights in the input matrix.

See Also

Other flight data related topics: flights, getFlightDelayData(), plotFlights()

Examples

flightCountMatrixToConnectionList(flights$flightCounts[1:100, 1:100, 1])


graphicalExtremes documentation built on Nov. 14, 2023, 1:07 a.m.