This function is a generic interface into creating summaries of the Portal rodent species data. It contains a number of arguments to specify the kind of data to summarize (at what level of aggregation) and various choices for dealing with data quality, and output format.
abundance generates a table of rodent abundance
biomass() generates a table of rodent biomass
energy() generates a table of rodent energy
(computed as 5.69 * (biomass ^ 0.75) after White et al 2004)
rates() generates a table of rodent growth rates
(computed as r=log(N[t+1]/N[t])
summarize_rodent_data( path = get_default_data_path(), clean = TRUE, level = "Site", type = "Rodents", length = "all", plots = length, unknowns = FALSE, shape = "crosstab", time = "period", output = "abundance", fillweight = (output != "abundance"), na_drop = TRUE, zero_drop = switch(tolower(level), plot = FALSE, treatment = TRUE, site = TRUE), min_traps = 1, min_plots = 24, effort = FALSE, download_if_missing = TRUE, quiet = FALSE, include_unsampled = FALSE ) abundance(...) biomass(...) energy(...) rates(...) summarise_rodent_data( path = get_default_data_path(), clean = TRUE, level = "Site", type = "Rodents", length = "all", plots = length, unknowns = FALSE, shape = "crosstab", time = "period", output = "abundance", fillweight = (output != "abundance"), na_drop = TRUE, zero_drop = switch(tolower(level), plot = FALSE, treatment = TRUE, site = TRUE), min_traps = 1, min_plots = 24, effort = FALSE, download_if_missing = TRUE, quiet = FALSE, include_unsampled = FALSE )
either the file path that contains the PortalData folder or "repo", which then pulls data from the PortalData GitHub repository
logical, load only QA/QC rodent data (TRUE) or all data (FALSE)
summarize by "Plot", "Treatment", or "Site"
specify subset of species; either all "Rodents" or only "Granivores"
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)
return data as a "crosstab" or "flat" list
specify the format of the time index in the output, either "period" (sequential Portal surveys), "newmoon" (lunar cycle numbering), "date" (calendar date), or "all" (for all time indices)
specify whether to return "abundance", or "biomass", or "energy", or "rates"
specify whether to fill in unknown weights with other records from that individual or species, where possible
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)
minimum number of traps for a plot to be included
minimum number of plots within a period for an observation 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 producing messages
logical, overrides settings for `na_drop` and `zero_drop`, setting both to FALSE
arguments passed to
a data.frame in either "long" or "wide" format, depending on the value of `shape`