View source: R/addSiteCharacteristics.R
| addSiteCharacteristics | R Documentation |
Adds/replaces static site characteristics (topography, geology, ...) to plot elements of a VegX object from a data frame where rows are plots.
addSiteCharacteristics( target, x, mapping, measurementMethods = list(), missing.values = c(NA, ""), verbose = TRUE )
target |
The initial object of class |
x |
A data frame where each row corresponds to one plot observation. Columns can be varied. |
mapping |
A named list whose elements are strings that correspond to column names in
|
measurementMethods |
A named list of objects of class |
missing.values |
A character vector of values that should be considered as missing observations/measurements. |
verbose |
A boolean flag to indicate console output of the data integration process. |
Named elements in mapping other than those used by this function will be ignored. Missing value policy:
Missing plotName values are interpreted as if the previous non-missing value has to be used to define plot.
Missing subPlotName values are interpreted in that data refers to the parent plotName.
Missing measurements (e.g. aspect, slope,...) are simply not added to the Veg-X document.
The modified object of class VegX.
Wiser SK, Spencer N, De Caceres M, Kleikamp M, Boyle B & Peet RK (2011). Veg-X - an exchange standard for plot-based vegetation data
Other add functions:
addAggregateOrganismObservations(),
addCommunityObservations(),
addIndividualOrganismObservations(),
addPlotGeometries(),
addPlotLocations(),
addPlotObservations(),
addSiteObservations(),
addStratumObservations(),
addSurfaceCoverObservations(),
addTaxonBySiteData()
# Load source data
data(mokihinui)
# Define mapping
sitemapping = list(plotName = "Plot", subPlotName = "Subplot",
slope = "PlotSlope", aspect = "PlotAspect")
# Create new Veg-X document with site characteristics
x = addSiteCharacteristics(newVegX(), moki_site, mapping = sitemapping,
measurementMethods = list(slope = "Slope/degrees",
aspect = "Aspect/degrees"))
# Inspect the result
showElementTable(x, "plot")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.