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.indiv
Function Description: growth.indiv
This returns a complete table with growth rate of every individual, both relative and dbh-increment. The table also includes most other key pieces of information for every individual: species, dbh, coordinates. Growth is trimmed with trim.growth, and growth is returned as NA if the individual is excluded; note, though, that every individual tree is always included in the table, even if growth=NA. Arguments are the same as in growth().Function Arguments:
| Argument | Default Value |
|---|---|
| census1 | |
| census2 | |
| rounddown | FALSE |
| mindbh | 10 |
| dbhunit | 'mm' |
| err.limit | 4 |
| maxgrow | 75 |
Sample Usage:
growth.table=growth.indiv(bci.full5,bci.full6)
Function Source:
growth.indiv=function(census1,census2,rounddown=FALSE,mindbh=10,dbhunit='mm',err.limit=4,maxgrow=75)
{
if(is.null(census2$codes)) census2$codes=rep('.',length(census2$dbh))
time=(census2$date-census1$date)/365.25
if(rounddown)
{
sm=((census1$dbh<55 | census2$dbh<55) & !is.na(census1$dbh) & !is.na(census2$dbh))
census1$dbh[sm]=rndown5(census1$dbh[sm])
census2$dbh[sm]=rndown5(census2$dbh[sm])
}
incgrowth=(census2$dbh-census1$dbh)/time
expgrowth=(log(census2$dbh)-log(census1$dbh))/time
good=trim.growth(census1,census2,time,err.limit=err.limit,maxgrow=maxgrow,mindbh=mindbh,dbhunit=dbh
unit) good[census1$dbh
growthdata=data.frame(treeID=census1$treeID,tag=census1$tag,sp=I(census1$sp),gx=census1$gx,gy=censu
s1$gy,dbh1=census1$dbh,dbh2=census2$dbh,time=time,
incgr=incgrowth,expgr=expgrowth,status1=census1$status,status2=census2$status
)
return(growthdata)
}