mat2df: Fast conversion of 2D mat to 3-column data.frame with dim1,...

View source: R/RcppExports.R

mat2dfR Documentation

Fast conversion of 2D mat to 3-column data.frame with dim1, dim2, value

Description

Converts a 2D numeric matrix into a 3-column data.frame

Arguments

mat

A matrix to convert to data.frame

Details

This function is a faster version of reshape2::melt for the simple 2-D case. It is about 2.5x faster than melt.

Value

A 3-column data.frame with dim1, dim2, and value

Author(s)

Michael Hallquist


ggbrain documentation built on April 4, 2025, 5:03 a.m.