meltWholeDF: Wide format to long format data conversion

View source: R/addons.R

meltWholeDFR Documentation

Wide format to long format data conversion

Description

The function converts wide format data which is either a data.frame or a matrix (with dimnames present) to a long format structure. The output data.frame have three columns: X, Y, and Measure. These are: column names, row names and values of the input object, respectively.

Usage

meltWholeDF(df)

Arguments

df

data.frame

Details

This function is particularly useful to prepare data for plotting with ggplot2 package.

Value

data.frame

Author(s)

Małgorzata Oleś <malgorzata.oles@embl.de>

Examples

df = data.frame(A=1:4, B=4:7, row.names=letters[1:4])
meltWholeDF(df)

MalgorzataOles/BloodCancerMultiOmics2017 documentation built on March 29, 2024, 2:29 p.m.