adjust: A generic function to scale the values of a vector between -1...

Description Usage Arguments Author(s) References See Also Examples

View source: R/adjust.R

Description

A generic function to scale the values of a vector between -1 and 1. The function is used in the IDM calculation, to scale a vector of ages at which size has been measured.

Usage

1
adjust(age)

Arguments

age

A numeric vector containing ages to be scaled between -1 and 1.

Author(s)

Anna Kuparinen and Mats Bj<f6>rklund

References

Kirkpatrick M, Lofsvold D, Bulmer M (1990) Analysis of the inheritance, selection and evolution of growth trajectories. Genetics 124:979-993.

See Also

IDM, IDM.bootCI

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# The function is currently defined as
function(age){
u=-1
v=1
n=length(age)
amin=min(age)
amax=max(age)

temp=u+(v-u)/(amax-amin)*(age-amin)
return(temp)
  }

InfDim documentation built on May 1, 2019, 9:09 p.m.