Description Usage Arguments Details Value Examples
DOCU: Explain what _extends is in pC, singalizes major functions that do not take the normal inputs but user other functions' results to work. Runs a simple additive weighting function over matrices
1 | overallPV_interface(trp.ValueMatrix, weight = NULL)
|
trp.ValueMatrix |
generally a list of matrices from different
users, such as the output of |
weight |
generally a list of weights from different users, such
as the output of |
Auxiliary function: Takes a matrix and a numeric vector and returns the overall weighted values for each row of the matrix by means of a simple additiv weighting function.
The columns of the matrix should be different attributes of a
product or setup and the weight vector should contain a numeric value for
each attribute, so that ncol(trp.ValueMatrix)=length(weight)
. Both
parameters are vectorised so you can enter a list of matrices in
trp.ValueMatrix
and a list of vector in weight
. A matrix in
the first argument or a vector in the second will be coerced into a list.
If some elements of the output list are called $<NA>
, then try to
avoid recycling by checking your weight
input.
a (list of) vector(s) of overall prospect values
1 2 3 4 5 6 7 8 9 10 11 | #Runnable
overallPV_interface(trp.ValueMatrix = matrix(1:8, 2, 4), weight = c(0.25, 0.3, 0.15, 0.3))
overallPV_interface(matrix(1:32, 16, 2), c(0.72, 0.25))
overallPV_interface(list(m1 = matrix(1:32, 16, 2), m2 = matrix(1:14, 7, 2)),
weight = c(100, 200)) # weight will be recycled: used on both matrices
overallPV_interface(list(m1 = matrix(1:32, 16, 2), m2 = matrix(1:14, 7, 2)),
list(weight1 = c(100, 200), weight2 = c(20, 50)))
#Not Runnable
overallPV_interface(aLargeListOfMatrices, weight = c(0.1, 0.2, 0.62, 0.05, 0.03))
overallPV_interface(aLargeListOfMatrices, aLargeListOfVectors) #both arguments should have equal length
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.