decapitate: Separate the <head> from the <body> of an html file

Description Usage Arguments Value Examples

Description

This function works line-wise to separate the <head> from the <body>, so using, e.g., readLines(infile) as the input is suitable. Checks if length(doc) == 1 and splits on newlines to create the vector. Excludes the <html> and </html> tags.

Usage

1

Arguments

doc

An object representation of an html file

Value

A list with the <head> ($head) and <body> ($body) of doc

Examples

1
2
3
4
## Not run: 
decapitate(html_file)

## End(Not run)

jacob-ogre/gdoc2rmd documentation built on May 18, 2019, 8:01 a.m.