| get_TextType {EML} | R Documentation |
Render a TextType node int HTML or some other format
get_TextType(node, to = "html", output = tempfile(class(node), fileext =
paste0(".", to)), view = TRUE)
node |
any TextType node |
to |
desired format, default is html, but can be any type supported by pandoc (docx, md, etc) |
output |
name of the desired output file |
view |
if HTML, do we want to open result in browser? |
creates a file requested.
## Convert an EML abstract to markdown
f <- system.file("examples/hf205.xml", package = "EML")
eml <- read_eml(f)
abstract <- eml_get(eml, "abstract")
get_TextType(abstract[[1]], "markdown", "abstract.markdown")
readLines("abstract.markdown")
unlink("abstract.markdown") # tidy up
## Turn a docx file into EML abstract and preview at HTML
f <- system.file("examples/hf205-abstract.docx", package = "EML")
a <- as(set_TextType(f), "abstract")
get_TextType(a)