View source: R/get_incidence_matrix.R
get_incidence_matrix | R Documentation |
This function creates an incidence matrix
get_incidence_matrix(db, returnDataFrame = FALSE)
db |
A data.frame or matrix with two columns, for example host and parasites |
returnDataFrame |
Logical, by default if FALSE and the function returns a Matrix |
An incidence matrix or data.frame (tibble) with rows of one kind (for example host) and columns with the other (for example parasites) filled with ones and zeros.
get_incidence_matrix(beetleTreeInteractions)
get_incidence_matrix(beetleTreeInteractions,
returnDataFrame = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.