Description Usage Arguments Value
View source: R/combine_weights_and_criteria.R
Add weights from a data frame to criteria tree and update data frame.
1 2 3 4 5 6 7 | combine_weights_and_criteria(
weightsMeansAndSDs,
criteria,
weightCols,
rootWeight = 1,
rootParentCriterion_id = "-"
)
|
weightsMeansAndSDs |
The data frame with the weights; should have a column 'criterion_id' and one or more columns with weights. |
criteria |
The 'criteria' object. |
weightCols |
A named character vector, where each value is a column with weights in ‘weightsMeansAndSDs', and each element’s name is the name that weight should get in the 'criteria$criteriaTree' and in the 'weightsMeansAndSDs' that is returned after acculumation over the tree. |
rootWeight |
The weight for the tree root. |
rootParentCriterion_id |
The identifier for the tree root. |
The updated 'weightsMeansAndSDs' (and 'criteria$criteriaTree' is updated in memory).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.