Learn R Programming

GHCNr (version 1.4.6)

monthly_coverage: Calculate Monthly Coverage

Description

monthly_coverage() calculates how many days have been recorded for each month in the time period.

Usage

monthly_coverage(x)

Value

A table with mothly coverage.

Arguments

x

Object of class ghcn_daily. See daily() for details.

Details

To calculate the coverage, a full daily time range is full joined to the timeseries. Missing days are set to NA. Coverage is then calculated as the number of values that are not NAs over the number of NAs.

Examples

Run this code
cleaned <- remove_flagged(CA003076680)
cover <- monthly_coverage(cleaned)
cover[cover$year == 2020, ]

Run the code above in your browser using DataLab