multi_comp: Multiplicative component description of origin-destination...

Description Usage Arguments Value Examples

View source: R/multi_comp.R

Description

Multiplicative component descriptions of *n*-dimension flow tables based on total reference coding system.

Usage

1

Arguments

m

matrix or array of migration flows

Value

matrix or array of multiplicative components of 'm'. When output is an array the total for each table of origin-destination flows is used.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
r <- LETTERS[1:4]
m0 <- matrix(data = c(0, 100, 30, 70, 50, 0, 45, 5, 60, 35, 0, 40, 20, 25, 20, 0), 
             nrow = 4, ncol = 4, byrow = TRUE, dimnames = list(orig = r, dest = r))
addmargins(m0)
multi_comp(m = m0)

# data frame
library(dplyr)
italy_area %>%
  filter(year == 2000) %>%
  multi_comp()

migest documentation built on July 25, 2021, 9:07 a.m.