Learn R Programming

InfDim (version 1.0)

adjust: A generic function to scale the values of a vector between -1 and 1. This function is a subfunction of IDM.

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

adjust(age)

Arguments

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

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

Run this code
# 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)
  }

Run the code above in your browser using DataLab