| interaction_table_to_matrix | R Documentation |
Convert an interaction table to a matrix
interaction_table_to_matrix(data, row_col, column_col, value_col, fill = 0)
data |
Data frame. |
row_col, column_col, value_col |
Column names. |
fill |
Missing-pair value. |
A numeric matrix with row and column species names. Unspecified pairs receive fill; repeated pairs use the last supplied value.
records <- data.frame(plant = c("a", "b"), animal = c("x", "x"), p = c(0.8, 0.3))
interaction_table_to_matrix(records, "plant", "animal", "p")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.