| df2matrix | R Documentation | 
Convert data.frame and tibbles to matrices with named rows and columns
df2matrix(d, first_col_is_row_names = TRUE)
| d | data.frame or tibble | 
| first_col_is_row_names | TRUE if first column has row names | 
matrix
d <- data.frame(rname = c("x1", "x2"), x1 = c(1,2), x2 = c(3,4))
df2matrix(d)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.