getOutbreaks {ccmReportR} | R Documentation |
Execute a SOQL query against the Outbreak object
Description
getOutbreaks()
returns user-defined data from the CCM Outbreak object.
The Outbreak object maps to Outbreaks on the client-side.
Usage
getOutbreaks(
confirmedOnly = TRUE,
openOnly = TRUE,
healthUnit = NULL,
from = "1990-01-01",
to = as.character(Sys.Date()),
columns = "Id"
)
Arguments
confirmedOnly |
Logical scalar. Should the query limit results to confirmed outbreaks? Returns confirmed and suspect outbreaks by default. |
openOnly |
Logical scalar. Should the query limit results to open outbreaks? Returns open and closed outbreaks by default. |
healthUnit |
Character vector or scalar. Names the Public Health Unit
used to filter the query. |
from |
Character scalar. Identifies the start of the date range to include in the query. Defaults to the origin date of CCM. |
to |
Character scalar. Identifies the end of the date range
to include in the query. Defaults to |
columns |
Character scalar or character vector. Names the columns to
return from the Outbreak object. Defaults to |
Value
If the query succeeds, a tibble
containing columns
.
Examples
## Not run:
Get all open outbreaks for Durham.
outbreaks <- getOutbreaks(
confirmedOnly = FALSE,
healthUnit = 'Durham Region Health Department'
)
Specify the data to return. This can be field names or labels
N.B. Names are case sensitive!
outbreaks <- getOutbreaks(
columns = c("Id", "Outbreak Name", "Outbreak Number")
)
Limit the data to a specific time period.
outbreaks <- getOutbreaks(
from = "2021-01-01",
to = "2020-01-17"
)
## End(Not run)