mergecensus {CTFS} | R Documentation |
THIS FUNCTION IS OBSOLETE - USE create.status
TO ASSIGN THE
status
VARIABLE TO A CTFS DATAFILE.
Combines the census data of individuals trees from two censuses into a single record so that measures of dynamics can be computed.
mergecensus(census0, census1, pasoh = FALSE)
census0 |
name of census datafile for first census, must be a
dataframe, must be of same length as census2 |
census1 |
name of census datafile for second census, must be a
dataframe, must be of same length as census1 |
pasoh |
logical value for indication of site, some status
values at pasoh are treated differently than all other sites. Use pasoh
= TRUE if census is from the Pasoh site. |
The variable status
is created in this function. status
provides information on the condition of a tree in a given census.
The current values used are:
"A" alive, dbh >= 10, pom and date are valid values
"AS" alive, 0 < dbh < 10 which is too small for growth
measurements, pom and date are valid values
"AB" alive, dbh = 0, broken stem with no pom to measure
"D" dead, dbh and pom are not valid values, both set to NA
"P" recruit, not yet large enough for inclusion in census, dbh and
pom are not valid values, both set to NA
NA other conditions, missing data, inconsistent data, dbh and pom
are not valid values, both set to NA
At Pasoh, there were some differences in the way dbh were coded for
trees that were alive but 0 < dbh < 10. The status of these trees
is:
"A" alive, 0 < dbh < 10, but too small for growth measurements
Both of the input datasets must already be structured to include the
variables and col names referred to in this function.
The censuses do not have to be sequential, any 2 censuses can be
used. Just make sure to name the generated file appropriately so you
know which census data is included. EG: bci9095.full
or
bci8590.full
The site
parameter is only needed, at this time, to
distinguish "Pasoh" from the other sites as the measurements for
trees less than 50 mm dbh during the initial census were handled
differently than at other sites and this affects the computations
of growth.
returns a data frame of the same number of rows as the input files and with new variables to distinguish the censuses from each other
At this time, mergecensus
only handles the true first
census as a value for census0
. For all other sites, any 2
censuses can be used.
Suzanne Lao, Rick Condit and Pamela Hall
## Not run: mergecensus(site="bci",census0=tst.bci90.full,census1=tst.bci95.full)->tst.bci9095.full dim(tst.bci9095.full) [1] 12421 14 names(tst.bci9095.full) [1] "tag" "sp" "gx" "gy" "dbh0" "dbh1" "pom0" "pom1" "date0" "date1" "codes0" "codes1" [13] "status0" "status1" tst.bci9095.full[1:5,] tag sp gx gy dbh0 dbh1 pom0 pom1 date0 date1 codes0 codes1 status0 status1 1 -27784 alsebl -9.0 -9.0 NA NA 0 0 0 0 * * <NA> <NA> 2 47 alsebl 984.3 341.6 437 426 2 3 3702 5382 B B A A 3 49 alsebl 985.3 328.9 228 228 1 1 3632 5396 * * A A 4 68 alsebl 985.7 275.8 278 277 1 1 3627 5390 * * A A 5 71 alsebl 999.9 277.6 269 318 1 1 3627 5390 M * A A ## End(Not run)