matrix_to_tibble: matrix or data.frame to tibble (taken from tidyquant)

Description Usage Arguments Examples

View source: R/matrix_to_tibble.R

Description

matrix or data.frame to tibble (taken from tidyquant)

Usage

1
matrix_to_tibble(x, preserve_row_names = "row.names", ...)

Arguments

x

a matrix

preserve_row_names

give name to rownames column, if NULL discard rownames

...

further parameters passed to as_tibble

Examples

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))

protViz/quantable documentation built on Nov. 29, 2021, 10:07 a.m.