Description Usage Arguments Value Examples
View source: R/city_aggregate.R
This function allows you to aggregate cities of a dataframe from designed identifier
1 | city_aggregate(before, after, tabflows, idori, iddes)
|
before |
A list of the identifiers to be replaced as numeric |
after |
A number of the identifier replacement |
tabflows |
A data.frame of flows between origins and destinations (long format matrix containing, at least, origins, destinations, flows) |
idori |
A character string giving the origin field name in tabflows (numeric) |
iddes |
A character string giving the destination field name in tabflows (numeric) |
A data.frame with the same variables as the shape, centroïds (lat,lon) and no geometries
1 2 3 4 5 6 7 8 9 10 11 | # Import data
before <- c(75101, 75102, 75103,75104, 75105,75106,75107, 75108, 75109,
75110,75111, 75112, 75113, 75114,75115, 75116, 75117,75118, 75119, 75120)
after <- 75056
data(tabflows)
idori <- "ORI"
iddes <- "DES"
cityAggregate <- city_aggregate(before, after, tabflows, idori, iddes)
cityAggregate[1:10,]
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.