list2df: Transform a list of character strings into a data.frame

Description Usage Arguments Value Examples

View source: R/dfmat.R

Description

Transform a list of character strings into a data.frame

Usage

1
list2df(list, names = NULL, col.names = c("Name", "Item"))

Arguments

list

A list of character strings

names

Values in the 'Name' column of the result, used if the input list has no names

col.names

Column names of the data.frame

Value

A data.frame

Examples

1
2
3
myList <- list(HSV=c("Mueller", "Papadopoulos", "Wood"), FCB=c("Lewandowski", "Robben", "Hummels"),
               BVB=c("Reus", "Goetze", "Kagawa"))
list2df(myList, col.names=c("Club", "Player"))

ribiosUtils documentation built on March 13, 2020, 2:54 a.m.