Topic: Growth
Topic Description:
Functions for analyzing tree growth, designed for the standard CTFS R Analytical Tables.
File: growth/growthfit.bin.r
| View File Source | Download File | No help file available |
Function: defineSDpar
Function Description: defineSDpar
For default SD parameters, if nothing else works. Choose the midpoint of x for the middle of 3 parameters.Function Arguments:
| Argument | Default Value |
|---|---|
| x | |
| nopar |
Function Source:
defineSDpar=function(x,nopar)
{
if(nopar==2) return(c(0.02,0))
midpoint=0.5*(min(x)+max(x))
return(c(0,midpoint,0.001))
}
#
#
# enoughSamplePerBin
#
#
# Test whether the number of elements in a vector x between successive breaks exceeds a minimum. If
any # bins have too few, it returns FALSE.
#
#
#
#
#
#
#
#
enoughSamplePerBin=function(x,b,...)
{
extra=list(...)
if(is.null(extra$MINBINSAMPLE)) minsample=0.1
else minsample=extra$MINBINSAMPLE
dbhcat=cut(x,b,right=FALSE)
Npercat=table(dbhcat)
if(length(which(Npercat0) return(FALSE)
else return(TRUE)
}
{
if(nopar==2) return(c(0.02,0))
midpoint=0.5*(min(x)+max(x))
return(c(0,midpoint,0.001))
}
#
#
# enoughSamplePerBin
#
#
# Test whether the number of elements in a vector x between successive breaks exceeds a minimum. If
any # bins have too few, it returns FALSE.
#
#
#
#
#
#
#
#
enoughSamplePerBin=function(x,b,...)
{
extra=list(...)
if(is.null(extra$MINBINSAMPLE)) minsample=0.1
else minsample=extra$MINBINSAMPLE
dbhcat=cut(x,b,right=FALSE)
Npercat=table(dbhcat)
if(length(which(Npercat
else return(TRUE)
}