count_summary: Compute a summary of counts

Description Usage Arguments Value Examples

View source: R/read_tdf.R

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

1
2
3
4
5
6
7
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

1
2
3
4
5
data(skylark)
count_summary(skylark)

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

Example output

Welcome to rtrim 2.0.6 Type ?`rtrim-package` to get started.

Attaching package: 'rtrim'

The following object is masked from 'package:stats':

    heatmap

Total number of sites                   55
Sites without positive counts (0): 
Number of observed zero counts            0
Number of observed positive counts      202
Total number of observed counts         202
Number of missing counts                238
Total number of counts                  440
[1] 0

rtrim documentation built on April 21, 2020, 5:06 p.m.