pct.cover: Calculating percent cover from LPI data.

Description Usage Arguments

View source: R/pct.cover.R

Description

Calculate the percent cover by plot for variables or combinations of variables. Percent cover will be calculated for every combination of the variables requested, so if the variables are GrowthHabitSub and Duration then the output will contain fields like Graminoid.Perennial, Graminoid.Annual, Shrub.Perennial, etc. whereas using just the variable code will produce one column per species code. Any number of indicator variables can be used. These are calculated as cover from anywhere in the canopy column or as only the first hit in the canopy column. Any groupings where all the variable values were NA will be dropped.

Usage

1
2
pct.cover(lpi.tall, tall = FALSE, hit = "any", by.year = FALSE,
  by.line = FALSE, ...)

Arguments

lpi.tall

A tall/long-format data frame. Use the data frame "layers" from the gather.lpi() output.

tall

Logical. If TRUE then the returned data frame will be tall rather than wide and will not have observations for non-existent values e.g., if no data fell into a group on a plot, there will be no row for that group on that plot. Defaults to FALSE.

hit

Character string. If "any" then percent cover will be calculated using any hit in the canopy column (so a single pin drop record may be counted more than once if it had hits that corresponded to different groups). If "first" then only the first canopy hit at a pin drop will be used to calculate cover. Defaults to "any".

by.year

Logical. If TRUE then results will be reported further grouped by year using the DateModified field from the data forms. Defaults to FALSE.

by.line

Logical. If TRUR then results will be reported further grouped by line using the LineID and LineKey fields from the data forms. Defaults to FALSE.

...

One or more bare variable name from lpi.tall to calculate percent cover for, e.g. GrowthHabitSub to calculate percent cover by growth habits or GrowthHabitSub, Duration to calculate percent cover for categories like perennial forbs, annual graminoids, etc.


nstauffer/dima.tools documentation built on May 20, 2019, 2:09 p.m.