prodlim (version 2019.11.13)

List2Matrix: Reduce list to a matrix or data.frame with names as new columns

Description

This function is used by summary.prodlim to deal with results.

Usage

List2Matrix(list, depth, names)

Value

Matrix or data.frame.

Arguments

list

A named list which contains nested lists

depth

The depth in the list hierarchy until an rbindable object

names

Names for the list variables

Author

Thomas A. Gerds <tag@biostat.ku.dk>

Details

Reduction is done with rbind.

Examples

Run this code

x=list(a=data.frame(u=1,b=2,c=3),b=data.frame(u=3,b=4,c=6))
List2Matrix(x,depth=1,"X")

Run the code above in your browser using DataLab