fBoxplot | R Documentation |
Functional boxplot based on central region computed by a specified measure.
The options of the measures can be found in central_region
.
fBoxplot(curve_sets, factor = 1.5, coverage = 0.5, ...)
curve_sets |
A |
factor |
The constant factor to inflate the central region to produce a functional boxplot and determine fences for outliers. Default is 1.5 as in a classical boxplot. |
coverage |
A number between 0 and 1. The 100*coverage% central region will be calculated. A vector of values can also be provided, leading to the corresponding number of central regions. |
... |
Additional parameters to be passed to |
if(requireNamespace("fda", quietly=TRUE)) { years <- paste(1:18) curves <- fda::growth[['hgtf']][years,] # Heights cset1 <- create_curve_set(list(r = as.numeric(years), obs = curves)) bp <- fBoxplot(cset1, coverage=0.50, type="area", factor=1) plot(bp) # Considering simultaneously heights and height differences cset2 <- create_curve_set(list(r = as.numeric(years[-1]), obs = curves[-1,] - curves[-nrow(curves),])) csets <- list(Height=cset1, Change=cset2) res <- fBoxplot(csets, type='area', factor=1.5) plot(res) + ggplot2::labs(x="Age (years)", y="") }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.