Learn R Programming

BBmisc (version 1.5)

convertRowsToList: Convert rows of data.frame or matrix to lists.

Description

For each row, one list is constructed, each entry of the row becomes a separate list element.

Usage

convertRowsToList(x, use.names = FALSE, factors.as.char = TRUE)

Arguments

x
[matrix | data.frame] Object to convert.
use.names
[logical(1)] Name elements of lists with column names of x. Default is FALSE.
factors.as.char
[logical(1)] If x is a data.frame, convert factor columns to string elements in the resulting lists? Default is TRUE.

Value

  • [list of lists].