repeatSub: Repeat table subheadings

Description Usage Arguments Details Value Author(s) Examples

View source: R/repeatSub.R

Description

Repeat table subheadings down a new column

Usage

1
repeatSub(x, column = "subheading", first = TRUE, ...)

Arguments

x

a data.frame with subheadings

column

column name

first

add subheader as first column

...

other options passed to fixTypes

Details

Identifies subheadings in a data frame by checking for rows with a non-empty first column and all other columns empty. Removes subheader rows and repeats values down a new column.

Value

A data frame

Author(s)

Chris Stubben

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
doc <- pmcOAI("PMC2231364" )
t1<-pmcTable(doc, 1)
head(t1, 10)
t1<-repeatSub(t1)
head(t1,10)
table2(t1$sub)

## End(Not run)

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