data_prep: Mangrove Data Preparation

Description Usage Arguments Value

View source: R/data_prep.R

Description

Reads singular excel file with tabs containing data gathered in a plot-method survey of mangrove stands.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
data_prep(
  excelpath = excelpath,
  nontabs = 0,
  location = NA,
  sitename = "SITE NAME",
  site = "SITE",
  plotnumber = "PLOT #",
  plotsize = "Plot size",
  species = "Species",
  gbh = "GBH (cm)",
  dbh = "DBH (cm)",
  height = "Height (m)",
  levels = list()
)

Arguments

excelpath

String where the excel file is located.

nontabs

Number of tabs in excel file which does are not part of the plot data. These tabs must be located at the end of all tabs with necessary data.

location

Name the general location where the survey took place.

sitename

Column name indicating the name of the site. Default is "SITE NAME".

site

Column name indicating the tag or code for the site. Default is "SITE".

plotnumber

Column name indicating the plot tag for each site. Default is "PLOT #".

plotsize

Column name indicating the area of plots. Default is "Plot size".

species

Column name indicating the type of species. Default is "Species".

gbh

Column name indicating measured girth at breast height. Default is "GBH (cm)". Optional IF DBH is present.

dbh

Column name indicating measured diameter at breast height. Default is "DBH (cm)". Optional IF GBH is present.

height

Column name indicating the height measured. Default is "Height (m)". Optional.

levels

List of column names set for varying spatial levels.

Value

Outputs should include'm.data', a consolidated data frame containing information, and 'm.data.saps', contains observations that fall less than 5 DBH


ppcadelina/bucs documentation built on April 4, 2020, 5:52 a.m.