Match rows and columns of distance and trip matricesSource:
Match rows and columns of distance and trip matrices
A wide- or long-form trip or distance matrix returned from
The corresponding distance or trip matrix.
A list of the same matrices with matching start and end stations, and
in the same order passed to the routine (that is,
mat2). Each kind of matrix will be identified and named accordingly as
either "trip" or "dist". Matrices are returned in same format (long or wide)
Distance matrices returned from
bike_distamat use all stations
listed for a given system, while trip matrices extracted with
bike_tripmat will often have fewer stations because operational
station numbers commonly vary over time. This function reconciles the two
matrices through matching all row and column names (or just station IDs for
long-form matrices), enabling then to be directly compared.