is_observed: Check observed

View source: R/utils.R

is_observedR Documentation

Check observed

Description

This function checks if the object is of class signal and observed.

Usage

is_observed(x)

Arguments

x

Input object to be checked

Value

Logical as to whether or not the input object inherits the "signal" and "observed" classes.

Examples

hosp <- read.csv(system.file("extdata/observed/hdgov_hosp_weekly.csv", package = "rplanes"))
hosp$date <- as.Date(hosp$date, format = "%Y-%m-%d")
sig <- to_signal(hosp, outcome = "flu.admits", type = "observed", resolution = "weeks")
is_observed(sig)

rplanes documentation built on Sept. 11, 2024, 9:01 p.m.