Learn R Programming

cocoreg (version 0.1.1)

data_collections2ggdf: Catenate a set of data collections (lists of data.frames) into a single molted data.frame.

Description

Can be used e.g. to prepare data for plotting with ggplot().

Usage

data_collections2ggdf(..., id.vars = NULL)

Arguments

...
Several lists of data.frames to catenate
id.vars
[1,m] string, ID variables for reshape::melt

Value

A data.frame with elements of ... melted and catenated vertically into a single data.frame.

Extra columns created:

ds:
dataset id within data collection
dc:
data collection id

Examples

Run this code
df_lst <- list(df1 = iris[,2:3], df2 = iris[2:3])
data_collections2ggdf(dc1 = df_lst, dc2 = df_lst)

Run the code above in your browser using DataLab