RC_melt: RC_melt

Description Usage Arguments Value Author(s) References Examples

View source: R/RC_melt.R

Description

A simple function that creates a kind of "melted" data frame from the melt function in reshape package. It does the melting directly from the Data and Design object. The result can be easily use with ggplot.

Usage

1
RC_melt(Data, Design)

Arguments

Data

An R data frame containing your data as gene expression with genes in column and sample in rows.

Design

An R dataframe describing your samples. Typically the rows in your design file should match the rows in your data file. The colum can represent any descriptive features like batch, group, patient's sex ...

Value

Return a melted data frame with the same columns you should have in your Design dataframe plus 2 columns variable and value that are related to Data (e.g Variable = genes and value = counts)

Author(s)

Benjamin Vittrant

References

https://cran.r-project.org/web/packages/reshape/index.html

Examples

1
2
3
4
5
6
7
8
9
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
RC_melt = function(Data, Design){
  Data_melt = cbind(Data, Design) 
  return(Data_melt)
}

bvittrant/RCommon documentation built on May 4, 2020, 3:04 p.m.