combine_weights_and_criteria.Rd
Add weights from a data frame to criteria tree and update data frame.
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).