nexml_read | R Documentation |
Read NeXML files into various R formats
nexml_read(x, ...) ## S3 method for class 'character' nexml_read(x, ...) ## S3 method for class 'XMLInternalDocument' nexml_read(x, ...) ## S3 method for class 'XMLInternalNode' nexml_read(x, ...)
x |
Path to the file to be read in. An |
... |
Further arguments passed on to |
# 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)) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.