Skip to content

Commit

Permalink
Remove presence from max counts
Browse files Browse the repository at this point in the history
  • Loading branch information
gmyenni committed Jan 31, 2025
1 parent ba1f4b1 commit a0c6a34
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions R/max_counts.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,16 @@
#' @export
#'
max_counts <- function(path = get_default_data_path(),
minyear = 1986, maxyear = format(Sys.Date(), "%Y"),
minyear = 1986, maxyear = as.numeric(format(Sys.Date(), "%Y")),
level = "colony")
{
level <- tolower(level)
options(dplyr.summarise.inform = FALSE)
minyear <- as.integer(minyear); maxyear <- as.integer(maxyear)

colonies <- load_datafile("Counts/maxcounts.csv") %>%
dplyr::filter(dplyr::between(.data$year, minyear, maxyear)) %>%
dplyr::filter(dplyr::between(.data$year, minyear, maxyear),
!(notes %in% c("presence", "present and nesting but numbers unknown"))) %>%
dplyr::group_by(.data$year, .data$colony, .data$species) %>%
dplyr::summarise(count = max(.data$count)) %>%
dplyr::select("year", "colony", "species", "count") %>%
Expand Down
2 changes: 1 addition & 1 deletion man/max_counts.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a0c6a34

Please sign in to comment.