list2fullDF.byNames: list2fullDF.byNames

View source: R/CodeAndRoll2.R

list2fullDF.byNamesR Documentation

list2fullDF.byNames

Description

Converts a list to a full matrix, with rows and columns named by the elements of the list.

Usage

list2fullDF.byNames(
  your.list = list(set.1 = vec.fromNames(LETTERS[1:5], fill = 1), set.2 =
    vec.fromNames(LETTERS[3:9], fill = 2)),
  as.df = TRUE,
  byRow = TRUE,
  FILL = NA
)

Arguments

your.list

A list.

as.df

Logical. Whether to return a data frame (default) or a matrix.

byRow

Logical. Whether the resulting matrix should be arranged by row (default) or by column.

FILL

A value to fill in missing entries.

Value

A matrix with the same elements as your.list, but with rows and columns named by the elements of the list.

Examples

your.list <- list(set.1 = LETTERS[1:5], set.2 = LETTERS[3:9])
list2fullDF.byNames(your.list)


vertesy/CodeAndRoll2 documentation built on Nov. 20, 2024, 5:23 a.m.