putPointsCriterionFunction: Put value functions defined by sets of points

Description Usage Arguments Value Examples

View source: R/libxmcda.R

Description

Puts value functions defined by sets of points in a criterionFunction tag under the criterion tag in an XML tree written according to the XMCDA standard.

Usage

1
putPointsCriterionFunction(tree, points, mcdaConcept = NULL)

Arguments

tree

Object containing the XMCDA XML tree.

points

A list, where each element is named by the ID of a criterion, and contains a matrix representing the points (each line is a point, the first column represents the abscissa, the second the ordinate).

mcdaConcept

A string containing the specific mcdaConcept attribute which should be written.

Value

The function returns a list structured as follows:

status

Either OK if all the <criterionFunction> tags could be correctly put, or the description of the error.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
tree = newXMLDoc()

newXMLNode("xmcda:XMCDA", 
           namespace = c("xsi" = "http://www.w3.org/2001/XMLSchema-instance", 
           "xmcda" = "http://www.decision-deck.org/2009/XMCDA-2.1.0"), 
           parent=tree)

x<-list()
x<-c(x,list(g1=rbind(c(1,2),c(3,4))))
x<-c(x,list(g2=rbind(c(5,6),c(7,8),c(9,10))))
x<-c(x,list(g3=rbind(c(11,12))))
x<-c(x,list(g4=rbind(c(13,14),c(15,16))))

putPointsCriterionFunction(tree,x)

RXMCDA documentation built on May 1, 2019, 10:23 p.m.