Description Usage Arguments Details Value References Examples
View source: R/monitor_dailyStatisticList.R
Calculates daily statistics for each monitor in ws_monitor
.
1 2 3 4 5 6 7 | monitor_dailyStatisticList(
ws_monitor,
FUN = get("mean"),
dayStart = "midnight",
na.rm = TRUE,
minHours = 18
)
|
ws_monitor |
ws_monitor object |
FUN |
function used to collapse a day's worth of data into a single number for each monitor in the ws_monitor object |
dayStart |
one of |
na.rm |
logical value indicating whether NA values should be ignored |
minHours |
minimum number of valid data hours required to calculate each daily statistic |
Splits the ws_monitor
object by timezone
and applies the
monitor_dailyStatistic()
function separately for each timezone.
See monitor_dailyStatistic for more details.
The results are returned as a list of ws_monitor objects with each element of the
list named with the associated timezone. Note that each ws_monitor$data$datetime
will be in local time. This is desirable as it ensures proper date formatting in tables and plots.
You should not attempt to reassemble a single ws_monitor object from the elements in this list.
A list of ws_monitor objects with daily statistics for each local timezone.
monitor_dailyStatistic
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | # Fail gracefully if any resources are not available
try({
library(PWFSLSmoke)
airnow <- airnow_loadLatest()
nw <- monitor_subset(airnow, stateCodes = c('WA','OR','ID','MT'))
dailyList <- monitor_dailyStatisticList(nw)
monitor_leaflet(dailyList[["America/Los_Angeles"]])
monitor_leaflet(dailyList[["America/Boise"]])
monitor_leaflet(dailyList[["America/Denver"]])
}, silent = FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.