fillUniqueIdentifiers: Generates unique identifiers

View source: R/fillUniqueIdentifiers.R

fillUniqueIdentifiersR Documentation

Generates unique identifiers

Description

Generates unique identifiers for plot elements or plot observation elements

Usage

fillUniqueIdentifiers(target, element = "plot", replace.existing = FALSE)

Arguments

target

The initial object of class VegX to be modified

element

The Veg-X main element for which unique identifiers are needed: "plot" or "plotObservation".

replace.existing

A boolean flag to indicate whether newly generated identifiers should replace existing identifiers.

Value

The modified object of class VegX.

References

Wiser SK, Spencer N, De Caceres M, Kleikamp M, Boyle B & Peet RK (2011). Veg-X - an exchange standard for plot-based vegetation data

See Also

Other fill functions: fillPartyInformation(), fillProjectInformation()

Examples

# Load source data
data(mokihinui)

# Create a new Veg-X document with projects, plots and plot observations (no data)
mapping = list(projectTitle = "Project", plotName = "Plot", subPlotName = "Subplot",
               obsStartDate = "PlotObsStartDate", obsEndDate = "PlotObsStopDate")
x = addPlotObservations(newVegX(), moki_site, mapping = mapping)

# Examine the result
showElementTable(x, "plot")

# Add unique identifiers
y = fillUniqueIdentifiers(x, "plot")

# Examine the result
showElementTable(y, "plot")


miquelcaceres/VegX documentation built on Sept. 18, 2022, 7:04 p.m.