getRecruits | R Documentation |
This function calculates the number of new recruits of
each species in each quadrat in each year. The input data must already
contain a column indicating whether each observation is classified as a
recruit or not. This recruit status can be generated from the
trackSpp
function in plantTracker
, or can be information that
was collected in the field. This function includes an option that determines
whether each ramet of a clonal species is considered an individual recruit,
or if the entire genet is considered a single recruit.
getRecruits(
dat,
byGenet = TRUE,
species = "Species",
quad = "Quad",
site = "Site",
year = "Year",
trackID = "trackID",
recruit = "recruit",
...
)
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. A
data.frame returned by
|
byGenet |
A logical argument. |
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'). |
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'). |
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'). |
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'). |
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') |
recruit |
An optional character string argument. Indicates the name of the column in 'dat' that contains information indicating whether or not this row represents data for a recruit. It is unnecessary to include a value for this argument if the column name is "recruit" (default is "recruit"). |
... |
Other arguments passed on to methods. Not currently used. |
This function returns a table with columns for site, quadrat, species name, year, and number of recruits.
This function returns a data frame with the columns 'Site', 'Quad', 'speciesName', 'Year', and 'recruits'. The 'recruits' column contains a count of the number of individuals of the species and in the site, quadrat, and year indicated in the other columns of the data frame.
dat <- grasslandData[grasslandData$Site == c("AZ") &
grasslandData$Species %in% c("Bouteloua rothrockii",
"Calliandra eriophylla") &
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
)
getRecruits(dat = outDat,
byGenet = TRUE,
species = "speciesName"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.