Description Usage Arguments Value Examples
Get matrix from tibble
as_matrix
as_matrix
1 2 3 4 5 6 7 |
.data |
A tibble |
rownames |
A character string of the rownames |
do_check |
A boolean |
sep_rownames |
A character with which multiple columns are united if rownames is a column array (e.g., rownames = c(col1, col2)) |
A matrix
A 'tbl' with filled abundance
A 'tbl' with filled abundance
1 2 3 4 5 6 | library(dplyr)
library(tidyr)
select(mtcars_tidy, car_model, feature, value) %>%
spread(feature, value) %>%
as_matrix(rownames = car_model)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.