drawQuadMap {plantTracker} | R Documentation |
Create maps of a quadrat over time
Description
This function creates maps of a quadrat over time, color-coded by either species or by genet (trackID).
Usage
drawQuadMap(
dat,
type = "bySpecies",
addBuffer = FALSE,
species = "Species",
site = "Site",
quad = "Quad",
year = "Year",
geometry = "geometry",
trackID = "trackID",
...
)
Arguments
dat |
An sf data.frame in which each row represents a unique polygon
(either a genet or a ramet) in a unique site/quadrat/year combination. It is
recommended that you only input data for one quadrat at a time. A data.frame
returned by
|
type |
A character argument indicating how the plots returned by
|
addBuffer |
A logical argument indicating whether |
species |
An optional character string argument. Indicates the name of the column in 'dat' that contains species name data. It is unnecessary to include a value for this argument if the column name is "Species" (default value is 'Species'). |
site |
An optional character string argument. Indicates the name of the column in 'dat' that contains site name data. It is unnecessary to include a value for this argument if the column name is "Site" (default value is 'Site'). |
quad |
An optional character string argument. Indicates the name of the column in 'dat' that contains quadrat name data. It is unnecessary to include a value for this argument if the column name is "Quad" (default is 'Quad'). |
year |
An optional character string argument. Indicates the name of the column in 'dat' that contains data for year of sampling. It is unnecessary to include a value for this argument if the column name is "Year" (default is 'Year'). |
geometry |
An optional character string argument. Indicates the name of the column in 'dat' that contains sf geometry data. It is unnecessary to include a value for this argument if the column name is "geometry" (default is 'geometry'). |
trackID |
An optional character string argument. Indicates the name of the column in 'dat' that contains unique identifiers for each genet. It is unnecessary to include a value for this argument if the column name is "trackID" (default is 'trackID') |
... |
Other arguments passed on to methods. Not currently used. |
Value
This function returns a multipanel plot where each panel shows a map of the quadrat in a unique year. Panels are arranged in chronological order, and plots are color-coded either by species or trackID (unique genet identifier).
#' @seealso trackSpp()
, which can be used to assign trackIDs
to observations.
Examples
dat <- grasslandData[grasslandData$Site == c("AZ") &
grasslandData$Quad == "SG2" &
grasslandData$Year %in% c(1922:1925),]
names(dat)[1] <- "speciesName"
inv <- grasslandInventory[unique(dat$Quad)]
outDat <- trackSpp(dat = dat,
inv = inv,
dorm = 1,
buff = .05,
buffGenet = 0.005,
clonal = data.frame("Species" = unique(dat$speciesName),
"clonal" = c(TRUE,FALSE)),
species = "speciesName",
aggByGenet = TRUE
)
drawQuadMap(dat = outDat,
type = "bySpecies",
addBuffer = FALSE,
species = "speciesName"
)