list.as.matrix: Convert list to matrix

Description Usage Arguments Value To do Note Author(s) See Also Examples

View source: R/list.as.matrix.R

Description

Convert list to matrix. List entries go to matrix columns, filled for equal length.

Usage

1
list.as.matrix(x, byrow=FALSE, filler = NA)

Arguments

x

a list of numeric vectors.

byrow

boolean. Arrange list entries as rows. Default is to use columns.

filler

a value to be used as a filler

Value

A matrix with the values from x, filled to matrix shape.

To do

Arguments should be as as.matrix.

A corresponding list.as.data.frame should be added for mixed types.

Name synchronisation/preservations should be added.

Note

This could go to as.matrix().

Author(s)

Günther Sawitzki <[email protected]>

See Also

as.matrix.

Examples

1
2
3
x <- list(x1=c(1,2,3),x2=3, x3=4:8)
list.as.matrix(x)
list.as.matrix(x,filler=0)

sprof documentation built on May 31, 2017, 1:56 a.m.