Description Usage Arguments Value
View source: R/add_weights_to_criteriaTree.R
This function takes weights from a data frame and adds them to the criteria tree. NOTE: the criteria tree is an R6 object. Therefore, when this function is called, the object will be changed in memory; i.e. the '$criteriaTree' 'data.tree' object that is passed in 'criteria' is passed by _reference_, not by value (the default for normal R objects).
1 2 3 4 5 6 7 | add_weights_to_criteriaTree(
weightsMeansAndSDs,
criteria,
weightCols,
rootWeight = 1,
rootParentCriterion_id = "-"
)
|
weightsMeansAndSDs |
A data frame with weights. |
criteria |
The criteria object. |
weightCols |
The column names of the columns to add. |
rootWeight |
The weight for the root (normally, 1). |
rootParentCriterion_id |
The identifier of the root. |
weightName |
The name to use for the variable with these weights. |
Invisibly, the 'criteria' object.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.