.scaleSpecGrp {wrMisc}R Documentation

Rescale respective to specific group

Description

This function allows to rescale data 'x' so that 2 specific groups get normalized to predefined values (and all other values follow proportionally) 'grp1Num' and 'grp2Num' should be either numeric for positions in 'x' or character for names of 'x'; if 'grp1Num' and/or 'grp2Num' design mulitple locations: perform median or mean summarization, according to 'sumMeth'

Usage

.scaleSpecGrp(
  x,
  grp1Num,
  grp1Val,
  grp2Num = NULL,
  grp2Val = NULL,
  sumMeth = "mean",
  callFrom = NULL
)

Arguments

x

(numeric vector) main input

grp1Num

(numeric)

grp1Val

(numeric)

grp2Num

(numeric)

grp2Val

(numeric)

sumMeth

(character) method for summarizing

callFrom

(character) allow easier tracking of messages produced

Value

numeric vector

See Also

which.min

Examples

.firstMin(c(4,3:6))

[Package wrMisc version 1.15.1 Index]