combine_weights_and_criteria: Add weights from a data frame to criteria tree and update...

Description Usage Arguments Value

View source: R/combine_weights_and_criteria.R

Description

Add weights from a data frame to criteria tree and update data frame.

Usage

1
2
3
4
5
6
7
combine_weights_and_criteria(
  weightsMeansAndSDs,
  criteria,
  weightCols,
  rootWeight = 1,
  rootParentCriterion_id = "-"
)

Arguments

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.

Value

The updated 'weightsMeansAndSDs' (and 'criteria$criteriaTree' is updated in memory).


Matherion/mdmcda documentation built on Dec. 31, 2020, 3:13 p.m.