Catenate a list of data.frames vertically to a single data.frame

Share:

Description

Assumes equal variables for all datasets! Ouput has columns: <variables>, "dataset" Preserves list element names in column "dataset". For a more generic approach see dflst2dfmelt (uses reshape::melt(df_lst))

Usage

1
dflst2df(df_lst, id_var_name = "dataset")

Arguments

df_lst

[1,m] list of data.frames, A list of data.frames to process

id_var_name

string, Column name for the dataset id variable

Value

A data.frame with elements of df_lst catenated vertically, An extra column with dataset id is added.

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