colony_presence_absence: Ant Colony Presence Absence

View source: R/summarize_ants.R

colony_presence_absenceR Documentation

Ant Colony Presence Absence


Get ant species presence/absence by year/plot/stake from colony census data

Anomalies in ant colony census protocol over the years means that it can be difficult to discern true absences of all species in all years. This function uses information from Portal_ant_species.csv and Portal_ant_dataflags.csv to predict true presence/absence of species per plot per year. If a more conservative estimate is desired, setting the argument 'rare_sp = T' will only include species we are confident were censused regularly. Setting 'rare_sp = F' may include some false absences, since it is unknown if some rare species were censused in all years. Unknowns may also be excluded from output if desired.


  path = get_default_data_path(),
  level = "Site",
  rare_sp = FALSE,
  unknowns = FALSE,
  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


level at which to summarize data: 'Site', 'Plot', or 'Stake'


include rare species (T) or not (F). Rare species may or may not have been censused in all years. Setting 'rare_sp = FALSE' gives a more conservative estimate of presence/absence


include unknown species (TRUE) or not (FALSE). Unknowns include those only identified to genus.


if the specified file path doesn't have the PortalData folder, then download it


logical, whether to run without version messages


data frame with year, species, (plot if applicable), and presence [1, 0, NA]

portalr documentation built on Dec. 2, 2022, 1:05 a.m.