assemble.demography {CTFS} | R Documentation

## Reformat the Output from Demographic Functions from List to Dataframe

### Description

This function reformats the list of lists output from the demographic functions `mortality`, `recruitment`, `growth` and `abundance.change`.

### Usage

    assemble.demography(output, type = "g", whichdbhcat = 1,
        datefirst = "1980-1-1")

### Arguments

`output` | file containing the results from one of the demographic functions
`type` | type of demographic function with values:
“g” | output from `growth`
“a” | output from `abundance.change`
“m” | output from `mortality`
“r” | output from `recruitment`
`whichdbhcat` | number indicating how many dbh categories to include, cannot exceed the number of categories in `output`
`datefirst` | date of first enumeration at site, format: yyyy-mm-dd

### Details

The results of the demographic functions (`growth, mortality, recruitment, abundance` and related functions are lists. This is a very convenient format for further analysis but is not the easiest way to view the results of these functions. `assemble.demography` reformats the list output into a dataframe so that is resembles a table.

The columns of the dataframe are always composed of the values computed by the demographic function. The rows are the categories provided by the first split variable used in the demographic function. If a second split varible is used, then the argument `whichdbhcat` determines which category of the second spit variable is put into the dataframe.

Returned Values

`assemble.demography` returns a dataframe.

For `growth` the following values are returned:

`$rate`
  the annual growth rate in mm per year or % per year, type determined by the argument `method` are provided for `growth`
`$clim`
  the 95% confidence limit based on a normal distribution
`$N0`
  the number of trees used to compute growth rate
`$dbhmean`
  the mean dbh in mm for trees used to compute growth rate
`$meanyrs`
  mean number of years between census for trees used in growth rate computation.
`$date0`
  mean date of first census
`$date1`
  mean date of second census

For `mortality` the following values are returned:

`$rate`
  the mortality in %/year
`$upper`
  the upper 95% confidence interval based on a normal distribution
`$lower`
  the lower 95% confidence interval based on a normal distribution
`$N0`
  the number of living trees at the first census
`$S`
  the number of survivors from the first to second census
`$dbhmean`
  the mean dbh in mm for trees used to compute growth rate
`$meanyrs`
  mean number of years between census for trees used in growth rate computation.
`$date0`
  mean date of first census
`$date1`
  mean date of second census

For `recruitment` the following values are returned:

`$rate`
  the recruitment in %/year
`$upper`
  the upper 95% confidence interval based on a normal distribution
`$lower`
  the lower 95% confidence interval based on a normal distribution
`$N1`
  the number of living trees at the second census
`$R`
  the number of recruits from the first to second census
`$meanyrs`
  mean number of years between census for trees used in growth rate computation.
`$date0`
  mean date of first census
`$date1`
  mean date of second census

For `abundance.change` the following values are returned:

`$rate`
  the change in abundance in %/year
`$prob`
  the prob `N0` == `N1`
`$N0`
  the number of living trees at the first census
`$N1`
  the number of living trees at the second census
`$D`
  the number of trees that died from the first to second census
`$R`
  the number of recruits from the first to second census
`$meanyrs`
  mean number of years between census for trees used in growth rate computation.
`$date0`
  mean date of first census
`$date1`
  mean date of second census

### Author(s)

Rick Condit and Pamela Hall

### See Also

`assemble.table.each`

### Examples

    ## Not run:
    1. Run the demographic function

    dbh.vct <- sep.dbh(tst.bci90.full,dbhclass=c(10,50,100,200,300,400,500))
    growth.dbh <- growth(tst.bci90.full,tst.bcio95.full)
    growth.dbh.out

    2. Reformat the output into a dataframe.  Note there is only one row in
    this dataframe because no split variable was used in growth()

    assemble.demography(growth.out)

    3.  Run the demographic functions with two split variables, species
    names and dbh classes. Only the first list of the output is shown.
    ## End(Not run)

[Package CTFS version 1.00 Index]