Description Usage Arguments Examples
View source: R/tibble_to_matrix.R
Convert tibble to matrix.
1 | tibble_to_matrix(.tbl, .row = FALSE, .rowname = NULL)
|
.tbl |
tibble |
.row |
logical, Want rownames? |
.rowname |
character, names of rownames column. |
1 2 3 4 5 6 7 8 9 10 11 | library(tibble)
tbl <-
tibble(com = sprintf("com_%d", 1:10),
V1 = rnorm(10),
V2 = rnorm(10))
# convert to matrix.
tibble_to_matrix(.tbl = tbl, .row = FALSE)
# move rownames to column.
tibble_to_matrix(.tbl = tbl, .row = TRUE, .rowname = "com")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.