Skip to content

Commit

Permalink
Use as_contactmatrix() method
Browse files Browse the repository at this point in the history
  • Loading branch information
Bisaloo committed Apr 22, 2024
1 parent d700a80 commit ab1cae6
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions R/contact_matrix.R
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,8 @@ contact_matrix <- function(
)
}

res <- contactmatrix::new_contactmatrix(
from = rep(rownames(matrix_country),
each = length(colnames(matrix_country))),
to = rep(colnames(matrix_country),
length(rownames(matrix_country))),
value = c(t(matrix_country)),
res <- contactmatrix::as_contactmatrix(
matrix_country,
symmetric = FALSE
)

Expand Down

0 comments on commit ab1cae6

Please sign in to comment.