collapse2: Collapse a data.frame

Description Usage Arguments Value Note Author(s) Examples

View source: R/collapse2.R

Description

Collapse a data.frame into a delimited list with column names and cell values

Usage

1
collapse2(x, footnotes = TRUE, rowid=TRUE, na.string)

Arguments

x

a data.frame

footnotes

include footnotes in collapse2d row

rowid

include row number

na.string

additional cell values to skip, default is NA and ""

Value

A vector with collapse2d table rows

Note

Will detect subheaders and add column using repeatSub

Author(s)

Chris Stubben

Examples

1
2
x <- data.frame(id=1:4, genes=c("aroB", "glnP", "ndhA","pyrF"))
collapse2(x)

cstubben/pmcXML documentation built on May 14, 2019, 12:25 p.m.