addMissingCwacCounts: Add missing CWAC counts to CWAC site data

View source: R/addMissingCwacCounts.R

addMissingCwacCountsR Documentation

Add missing CWAC counts to CWAC site data

Description

Add missing CWAC counts to CWAC site data

Usage

addMissingCwacCounts(site_counts, years)

Arguments

site_counts

A dataframe obtained from getCwacSiteCounts

years

A vector of years the function should complete. This is useful for cases where counts are missing at the beginning or end of the period. We can explicitly state which years should be in the data.

Details

Note that this function only works for South Africa currently. This is because it assumes that there are only two seasons: summer (labelled "S") and winter (labelled "W"). If any of these seasons have no data for any given year the function will fill it in with an NA.

Value

The same site_counts dataframe provided with additional rows for those Winter or Summer seasons for which no data were collected.

Examples

counts <- getCwacSiteCounts("26352535")
counts_w_miss <- addMissingCwacCounts(counts, years = 1993:2020)

AfricaBirdData/CWAC documentation built on Aug. 5, 2024, 12:40 a.m.