as.xml_document: Create an xml_document in a Project Context

Description Usage Arguments Value Methods (by class) See Also Examples

Description

Creates an xml_document in a project context.

Coerces xml_document to xml_document

Coerces numeric to xml_document

Coerces character to xml_document

Creates an xml_document from filepath

Creates an xml_document from modelname

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
as.xml_document(x, ...)

## S3 method for class 'xml_document'
as.xml_document(x, ...)

## S3 method for class 'numeric'
as.xml_document(x, ...)

## S3 method for class 'character'
as.xml_document(x, ...)

## S3 method for class 'filepath'
as.xml_document(x, strip.namespace = TRUE, ...)

## S3 method for class 'modelname'
as.xml_document(x, project = if (is.null(opt)) getwd()
  else opt, opt = getOption("project"), rundir = file.path(project, x),
  file = file.path(rundir, paste0(x, ".xml")), ...)

Arguments

x

object of dispatch

...

arguments to methods

strip.namespace

whether to strip e.g. nm: from xml elements

project

parent directory of model directories

opt

alternative argument for setting project

rundir

specific model directory

file

actual xml storage location; overrides others if specified directly

Value

xml_document

xml_document

xml_document

xml_document

xml_document

xml_document

Methods (by class)

See Also

xpath

Examples

1
2
3
library(magrittr)
options(project = system.file('project/model',package='partab'))
1001 %>% as.xml_document

bergsmat/partab documentation built on May 12, 2019, 3:09 p.m.