mat_to_df: Converts matrix to tibble dataframe

View source: R/mat_to_df.R

mat_to_dfR Documentation

Converts matrix to tibble dataframe

Description

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.

Usage

mat_to_df(mat, col_names = NA)

Arguments

mat

The matrix to be converted to a tibble.

col_names

vector of desired column names. By default = "chem01, chem02, chem03, ..."

Value

The matrix as a tibble object.

Examples

mat_as_df <- mat_to_df(matrix(rnorm(9), 3, 3))

Columbia-PRIME/PCPhelpers documentation built on April 24, 2022, 7:57 p.m.