Map elements to a data frame by row binding

mapToDataFrame(x, ...)

# S4 method for list
mapToDataFrame(x)

Arguments

x

Object.

...

Additional arguments.

Value

DataFrame.

Note

Updated 2021-04-27.

See also

Examples

x <- list( "a" = list( "aa" = seq(from = 1L, to = 3L), "bb" = seq(from = 4L, to = 6L) ), "b" = list( "cc" = seq(from = 7L, to = 9L), "dd" = seq(from = 10L, to = 12L) ), "c" = list( "ee" = seq(from = 13L, to = 15L), "ff" = seq(from = 16L, to = 18L) ) ) print(x)
#> $a #> $a$aa #> [1] 1 2 3 #> #> $a$bb #> [1] 4 5 6 #> #> #> $b #> $b$cc #> [1] 7 8 9 #> #> $b$dd #> [1] 10 11 12 #> #> #> $c #> $c$ee #> [1] 13 14 15 #> #> $c$ff #> [1] 16 17 18 #> #>
y <- mapToDataFrame(x) print(y)
#> DataFrame with 9 rows and 7 columns #> name aa bb cc dd ee ff #> <factor> <integer> <integer> <integer> <integer> <integer> <integer> #> 1 a 1 4 NA NA NA NA #> 2 a 2 5 NA NA NA NA #> 3 a 3 6 NA NA NA NA #> 4 b NA NA 7 10 NA NA #> 5 b NA NA 8 11 NA NA #> 6 b NA NA 9 12 NA NA #> 7 c NA NA NA NA 13 16 #> 8 c NA NA NA NA 14 17 #> 9 c NA NA NA NA 15 18