mat_to_df | R Documentation |
mat_to_df
returns the given matrix as a tibble dataframe.
As a tibble, the structure of the matrix can then be easily viewed with ggplot
.
mat_to_df(mat, col_names = NA)
mat |
The matrix to be converted to a tibble. |
col_names |
vector of desired column names. By default = "chem01, chem02, chem03, ..." |
The matrix as a tibble object.
mat_as_df <- mat_to_df(matrix(rnorm(9), 3, 3))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.