nexml_read

0th

Percentile

Read NeXML files into various R formats

Read NeXML files into various R formats

Usage
nexml_read(x, ...)

# S3 method for character nexml_read(x, ...)

# S3 method for XMLInternalDocument nexml_read(x, ...)

# S3 method for XMLInternalNode nexml_read(x, ...)

Arguments
x

Path to the file to be read in. Or an XMLInternalDocument-class or XMLInternalNode-class

...

Further arguments passed on to xmlParse

Aliases
  • nexml_read
  • read.nexml
  • nexml_read.character
  • nexml_read.XMLInternalDocument
  • nexml_read.XMLInternalNode
Examples
# NOT RUN {
# file
f <- system.file("examples", "trees.xml", package="RNeXML")
nexml_read(f)
# }
# NOT RUN {
 # may take > 5 s
# url
url <- "https://raw.githubusercontent.com/ropensci/RNeXML/master/inst/examples/trees.xml"
nexml_read(url)
# character string of XML
str <- paste0(readLines(f), collapse = "")
nexml_read(str)
# XMLInternalDocument
library("httr")
library("XML")
x <- xmlParse(content(GET(url)))
nexml_read(x)
# XMLInternalNode
nexml_read(xmlRoot(x))
# }
Documentation reproduced from package RNeXML, version 2.4.0, License: BSD_3_clause + file LICENSE

Community examples

Looks like there are no examples yet.