utilityfunc: Convert Values of Indicators to utility-values.

Description Usage Arguments Value

Description

Convert Values of Indicators to utility-values.

Usage

1
2
3
utilityfunc(x, type, x1 = 0, y1 = switch(as.character(type), prop = 0,
  negprop = 200, antiprop = 200, 0), x2 = calculatecenterfunc("mean", x,
  offset = 0), y2 = 100, replace_NA = TRUE)

Arguments

x

Numeric. Value to be converted.

type

One of c("prop", "negprop", antiprop", "identity")

x1

if (replace_NA=TRUE & is.na(x1)): 0

y1

if (replace_NA=TRUE & is.na(y1)): switch(as.character(type),prop=0,negprop=200,antiprop=200,0)

x2

if (replace_NA=TRUE & is.na(x2)): calculatecenterfunc("mean", x,offset=0)

y2

if (replace_NA=TRUE & is.na(y2)): 100

replace_NA

should NA be replaced at x1,y1,x2,y2 ??

Value

switch(as.character(type), prop = scale* (x+offset)/centervalue , negprop = 2*scale - scale*(x +offset)/centervalue , antiprop=scale* centervalue/(x+offset), identity= x)


JulianBo/mcdsupportshiny documentation built on July 5, 2019, 12:51 a.m.