as.data.frame_: as.data.frame.list fails if an element of the list is a list....

View source: R/new.R

as.data.frame_R Documentation

as.data.frame.list fails if an element of the list is a list. This version works in that eventuality.

Description

as.data.frame.list fails if an element of the list is a list. This version works in that eventuality.

Usage

as.data.frame_(x, row.names = NULL, optional = FALSE, ...)

## Default S3 method:
as.data.frame_(x, row.names = NULL, optional = FALSE, ...)

## S3 method for class 'list'
as.data.frame_(x, row.names = NULL, optional = FALSE, ...)

Arguments

x

list of elements of equal length possibly including lists

row.names

default NULL. See as.data.frame

optional

logical. See as.data.frame

...

See as.data.frame

Methods (by class)

  • as.data.frame_(default): "default" method

  • as.data.frame_(list): "list" method

Examples

alist <- list(x = 1:3, a = letters[1:3], lst = list(a=1, b= 'a', c= list(1:4)))
as.data.frame_(alist)

gmonette/gnew documentation built on Aug. 6, 2024, 10:18 a.m.