magnitude: magnitude returns the magnitude of numbers

View source: R/rutils.R

magnitudeR Documentation

magnitude returns the magnitude of numbers

Description

magnitude is useful when using an optimizer such as optim, which uses a parscale parameter. magnitude can determine the respective parscale value for each parameter value.

Usage

magnitude(x)

Arguments

x

the vector of numbers (parameters) whose magnitudes are needed

Value

a vector of magnitudes

Examples

## Not run: 
  x <- c(0,0.03,0.3,3,30,300,3000)
  magnitude(x)

## End(Not run)

haddonm/codeutils documentation built on April 15, 2024, 1:02 p.m.