Melt data.frame into ggplottable format

Share:

Description

Melts a data.frame into format that is suitable for use with ggplot2. Creates the time variable 't' used by plotting functions.

Usage

1

Arguments

df

A data.frame

Value

A ggplot2 compatible data.frame with time variable

Examples

1
2
3
4
5
6
7
## Not run: 
dc <- create_syn_data_toy()
df <- dc$data[[1]]
str(df)
str(df_ggplot_melt(df))

## End(Not run)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.