unlist_df: Unlist the columns in a data.frame

Description Usage Arguments Value Author(s) See Also Examples

View source: R/BioGeoBEARS_generics_v1.R

Description

Sometimes, matrices or data.frames will malfunction due to their having lists as columns and other weirdness. This is a shortcut for data.frame(lapply(df, function(x) unlist(x))).

Usage

1

Arguments

df

matrix or other object transformable to data.frame

Value

data.frame

Author(s)

Nicholas J. Matzke matzke@berkeley.edu

See Also

unlist_df2

Examples

1
2
x = matrix(c(1,2,3,4,5,6), nrow=3, ncol=2)
unlist_df2(x)

Example output

Loading required package: rexpokit
Loading required package: cladoRcpp
Loading required package: ape
Loading required package: phylobase

Attaching package: 'phylobase'

The following object is masked from 'package:ape':

    edges

     tmpcol tmpcol
[1,]      1      4
[2,]      2      5
[3,]      3      6

BioGeoBEARS documentation built on May 29, 2017, 8:36 p.m.