Topic: Utilities

Topic Description:

Basic R utilities used in many packages and functions, such as date and string manipulations, statistical distributions, geometry of lines and distances. The R package date is required for the two data functions.



File: utilities/distributions.r

View File Source Download File No help file available

Function: beta.normalized

Function Description: beta.normalized

Normalzing beta.total. No longer used.

Function Arguments:

ArgumentDefault Value
x
par1
xmin
par2
xmax

Function Source:

beta.normalized=function(x,par1,xmin,par2,xmax)
{
intvalue=try(integrate(beta.total,lower=xmin,upper=xmax,
par1=par1,xmin=xmin,par2=par2,xmax=xmax)$value)
if(!is.null(attributes(intvalue))) intvalue=0

integral.beta=intvalue

y=rep(0,length(x))
if(integral.beta==0) return(y)

inrange=x>=xmin & x<=xmax

y[inrange]=beta.total(x[inrange],par1,xmin,par2,xmax)/integral.beta

return(y)
}