This function is a generic interface into creating summaries of the Portal plant species data. It contains a number of arguments to specify both the kind of data to summarize, at what level of aggregation, various choices for dealing with data quality, and output format.
plant_abundance
generates a table of plant abundance
summarize_plant_data(
path = get_default_data_path(),
level = "Site",
type = "All",
length = "all",
plots = length,
unknowns = FALSE,
correct_sp = TRUE,
shape = "flat",
output = "abundance",
na_drop = switch(tolower(level), quadrat = FALSE, plot = FALSE, treatment = TRUE, site
= TRUE, TRUE),
zero_drop = switch(tolower(level), quadrat = TRUE, plot = FALSE, treatment = TRUE, site
= TRUE, TRUE),
min_quads = 1,
effort = TRUE,
download_if_missing = TRUE,
quiet = FALSE
)
plant_abundance(..., shape = "flat")
summarise_plant_data(
path = get_default_data_path(),
level = "Site",
type = "All",
length = "all",
plots = length,
unknowns = FALSE,
correct_sp = TRUE,
shape = "flat",
output = "abundance",
na_drop = switch(tolower(level), quadrat = FALSE, plot = FALSE, treatment = TRUE, site
= TRUE, TRUE),
zero_drop = switch(tolower(level), quadrat = TRUE, plot = FALSE, treatment = TRUE, site
= TRUE, TRUE),
min_quads = 1,
effort = TRUE,
download_if_missing = TRUE,
quiet = FALSE
)
either the file path that contains the PortalData folder or "repo", which then pulls data from the PortalData GitHub repository
summarize by "Plot", "Treatment", "Site", or "Quadrat"
specify subset of species; If type=Annuals, removes all non-annual species. If type=Summer Annuals, returns all annual species that can be found in the summer If type=Winter Annuals, returns all annual species that can be found in the winter If type=Non-woody, removes shrub and subshrub species If type=Perennials, returns all perennial species (includes shrubs and subshrubs) If type=Shrubs, returns only shrubs and subshrubs
specify subset of plots; use "All" plots or only "Longterm" plots (to be deprecated)
specify subset of plots; can be a vector of plots, or specific sets: "all" plots or "Longterm" plots (plots that have had the same treatment for the entire time series)
either removes all individuals not identified to species (unknowns = FALSE) or sums them in an additional column (unknowns = TRUE)
correct species names suspected to be incorrect in early data (T/F)
return data as a "crosstab" or "flat" list
specify whether to return "abundance", or "cover" [cover data starts in summer 2015]
logical, drop NA values (representing insufficient sampling) filling missing combinations of year-month-treatment/plot-species with NA could represent one of a few slightly different meanings: 1) that combo doesn't exist 2) that combo was skipped that month, or 3) that combo was trapped, but is unusable (a negative period code))
logical, drop 0s (representing sufficient sampling, but no detections)
numeric [1:16], minimum number of quadrats (out of 16) for a plot to be included
logical as to whether or not the effort columns should be included in the output
if the specified file path doesn't have the PortalData folder, then download it
logical, whether to run without version messages
arguments passed to summarize_plant_data
a data.frame in either "long" or "wide" format, depending on the value of `shape`