This function finds and compares the daily 'minima' (5th) and 'maxima' (95th) percentiles across groups using modified z-scores (Mean Absolute Deviation - MAD).
1 2 | percentFUN(x, date, obs, group, by.day = T, reflective = TRUE, theta = 2,
tau = NA)
|
date |
This is a required column with the format 'YYYY-MM-DD HH:MM:SS'. |
obs |
This is the numeric column under investigation. |
group |
This is the first grouping value of the data, with the default being 'site'. |
reflective |
This decides whether to use a selected time period of data (reflective), or to use data from the latest day (live). Defaults to TRUE. #' @param by.day This is an option for where analysis uses data from only that day ('cross', default), or uses all selected data ('auto', FALSE). If selecting auto, the last five days will be used. |
theta |
This sets the test threshold on whether to flag the data. Defaults to 2 (similar to 2 standard deviations). |
tau |
This sets the day threshold on whether to flag the data given consistent theta flags. Defaults to NA (no flags given). export examples percentFUN() |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.