Topic: Growth
Topic Description:
Functions for analyzing tree growth, designed for the standard CTFS R Analytical Tables.
File: growth/growth.r
| View File Source | Download File | No help file available |
Function: growth.dbh
Function Description: growth.dbh
This calculates forest-wide growth in given dbh categories. Arguments as for growth().Function Arguments:
| Argument | Default Value |
|---|---|
| census1 | |
| census2 | |
| classbreak | c(10,100,300) |
| dbhunit | 'mm' |
| growthcol | 'dbh' |
| err.limit | 4 |
| maxgrow | 75 |
| rounddown | FALSE |
| method | 'I' |
| stdev | FALSE |
| mindbh | 10 |
Sample Usage:
growth.dbh=growth.eachspp(bci.full5,bci.full6,classbreak=c(10,50,100,300,500))
Function Source:
growth.dbh=function(census1,census2,classbreak=c(10,100,300),dbhunit='mm',growthcol='dbh',
err.limit=4,maxgrow=75,rounddown=FALSE,method='I',stdev=FALSE,mindbh=10)
{
allbreak=c(classbreak,10000)
dbhclass=as.numeric(as.character(cut(census1$dbh,breaks=allbreak,right=F,labels=classbreak)))
result=growth(census1,census2,mindbh=mindbh,dbhunit=dbhunit,rounddown=rounddown,method=method,growt
hcol=growthcol, err.limit=err.limit,maxgrow=maxgrow,stdev=stdev,split2=dbhclass)
ord=order(result$dbhmean)
for(i in 1:length(result)) result[[i]]=result[[i]][ord]
return(result)
}
err.limit=4,maxgrow=75,rounddown=FALSE,method='I',stdev=FALSE,mindbh=10)
{
allbreak=c(classbreak,10000)
dbhclass=as.numeric(as.character(cut(census1$dbh,breaks=allbreak,right=F,labels=classbreak)))
result=growth(census1,census2,mindbh=mindbh,dbhunit=dbhunit,rounddown=rounddown,method=method,growt
hcol=growthcol, err.limit=err.limit,maxgrow=maxgrow,stdev=stdev,split2=dbhclass)
ord=order(result$dbhmean)
for(i in 1:length(result)) result[[i]]=result[[i]][ord]
return(result)
}