count_summary: Compute a summary of counts

View source: R/read_tdf.R

count_summaryR Documentation

Compute a summary of counts

Description

Summarize counts over a trim input dataset. Sites without counts are removed before any counting takes place (since these will not be used when calling trim). For the remaining records, the total number of zero-counts, positive counts, total number of observed counts and the total number of missings are reported.

Usage

count_summary(
  x,
  count_col = "count",
  site_col = "site",
  year_col = "year",
  eps = 1e-08
)

Arguments

x

A data.frame with annual counts per site.

count_col

[character|numeric] index of the column containing the counts

site_col

[character|numeric] index of the column containing the site ID's

year_col

[character|numeric] index of the column containing the year

eps

[numeric] Numbers smaller then eps are treated a zero.

Value

A list of class count.summary containing individual names.

Examples

data(skylark)
count_summary(skylark)

s <- count_summary(skylark)
s$zero_counts # obtain number of zero counts

rtrim documentation built on June 22, 2024, 10:39 a.m.