ITNadjust: Adjust ITN

Description Usage Arguments Value Examples

View source: R/ITNadjust_function.R

Description

This function adjusts ITN matrices so they are the same size

Usage

1
ITNadjust(MATlist, j)

Arguments

MATlist

A list of ITN matrices

j

Element of matrix list to compare with others

Value

Matrix

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
##Create a list of random matrices (of different sizes)
##Labels - letters of alphabet (can represent actor names)
mat1<- matrix(round(runif(10*10)), 10, 10)
rownames(mat1)<-LETTERS[1:10]
colnames(mat1)<-LETTERS[1:10]

mat2<- matrix(round(runif(10*10)), 10, 10)
rownames(mat2)<-LETTERS[10:19]
colnames(mat2)<-LETTERS[10:19]

mat3<- matrix(round(runif(12*12)), 12, 12)
rownames(mat3)<-LETTERS[15:26]
colnames(mat3)<-LETTERS[15:26]

##Create matrix list
MATlist<-list(mat1,mat2,mat3)

##Adjust matrix 1 so that it has additional rows/actors not
##in the original matrix

mat1adjust<-ITNadjust(MATlist,1)

ITNr documentation built on March 13, 2020, 1:48 a.m.

Related to ITNadjust in ITNr...