Description Usage Arguments Examples
View source: R/matrix_to_tibble.R
matrix or data.frame to tibble (taken from tidyquant)
1 | matrix_to_tibble(x, preserve_row_names = "row.names", ...)
|
x |
a matrix |
preserve_row_names |
give name to rownames column, if NULL discard rownames |
... |
further parameters passed to as_tibble |
1 2 3 4 | x <- matrix(rnorm(20), ncol=4)
rownames(x) <- LETTERS[1:nrow(x)]
matrix_to_tibble(x)
!(is.matrix(x) || is.data.frame(x))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.