prepare_data: Import and homogenize ForestGEO-like data.

Description Usage Arguments Value

View source: R/prepare_data.R

Description

Main routine to format, detect major obvious errors, and gap-fill those errors in ForestGEO-like data.

Usage

1
2
3
4
5
6
7
8
9
prepare_data(
  path,
  site,
  stem = TRUE,
  dbh_units = "mm",
  exclude_interval = NULL,
  keep_columns = c("treeid", "stemid", "tag", "stemtag", "sp", "quadrat", "gx", "gy",
    "dbh", "hom", "exactdate", "codes", "dfstatus", "agb", "brokenladder", "fire.code")
)

Arguments

path

String giving a path to a parent directory containing species and census datasets.

site

String giving the name of your site – one of one of site_info$site (e.g., 'barro colorado island'.

stem

TRUE(default) or FALSE reflect that your censuses are ForestGEO stem or tree (aka full) tables, respectively.

dbh_units

set the unit ("mm" or "cm") of DBH values, by default dbh_units=="mm".

exclude_interval

NULL by default. If needed a vector (e.g. c(1,2)) indicating which census interval(s) must be discarded from computation due, for instance, to a change in measurement protocol.

keep_column

character vector containing the name of the columns to keep in the data. Default is: c("treeid", "stemid", "tag", "stemtag", "sp", "quadrat", "gx", "gy", "dbh", "hom", "exactdate", "codes", "dfstatus", "agb", "brokenladder", "fire.code")

Value

A data.table (data.frame) with all relevant variables.


cpiponiot/cdynfgeo documentation built on July 7, 2020, 3:27 p.m.