df2table | R Documentation |
Convert data.frame and table to each other.
df2table(df, st = "stand", sp = "species", ab = "abundance")
table2df(tbl, st = "stand", sp = "species", ab = "abundance")
dist2df(dist)
df |
A data.frame. |
st, sp, ab |
A string. |
tbl |
A table. community matrix. rownames: stands. colnames: species. |
dist |
A distance table. |
df2table() return table, table2df() return data.frame, dist2df() return data.frame.
tibble::tibble(
st = paste0("st_", rep(1:2, times = 2)),
sp = paste0("sp_", rep(1:2, each = 2)),
ab = runif(4)) %>%
dplyr::bind_rows(., .) %>%
print() %>%
df2table("st", "sp", "ab")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.