latest_issue: Fetch the latest or earliest issue for each observation

View source: R/utils.R

latest_issueR Documentation

Fetch the latest or earliest issue for each observation

Description

The data returned from covidcast_signal() or covidcast_signals() can, if called with the issues argument, contain multiple issues for a single observation in a single location. These functions filter the data frame to contain only the earliest issue or only the latest issue.

Usage

latest_issue(df)

earliest_issue(df)

Arguments

df

A covidcast_signal or covidcast_signal_long data frame, such as returned from covidcast_signal() or the "long" format of aggregate_signals().

Value

A data frame in the same form, but with only the earliest or latest issue of every observation. Note that these functions sort the data frame as part of their filtering, so the output data frame rows may be in a different order.


covidcast documentation built on July 26, 2023, 5:29 p.m.