agree_C: Fast C++ implementation of agreement vector for the...

Description Usage Arguments Examples

View source: R/RcppExports.R

Description

agree_C_sparse uses sparse matrices.

Usage

1
2
3
agree_C(mat_A, mat_B)

agree_C_sparse(mat_A, mat_B)

Arguments

mat_A

a nB x K matrix of the observations to be matched. Must be integers.

mat_B

a nA x K matrix of the database into which a match is looked for. Must be integers.

Examples

1
2
3
4
5
6
7
8
mat1 <- matrix(round(rnorm(n=1000, sd=1.2)), ncol=10, nrow=100)
mat2 <- rbind(mat1[1:10, ],
             matrix(round(rnorm(n=900, sd=1.2)), ncol=10, nrow=90)
             )
rownames(mat1) <- paste0("A", 1:nrow(mat1))
rownames(mat1) <- paste0("B", 1:nrow(mat1))
mat1 <- 1*(mat1>1)
mat2 <- 1*(mat2>1)

borishejblum/ludic documentation built on Aug. 23, 2021, 3:09 p.m.