if(requireNamespace("fda", quietly=TRUE)) {
years <- paste(1:18)
curves <- fda::growth[['hgtf']][years,]
# Heights
cset1 <- curve_set(r = as.numeric(years),
obs = curves)
bp <- fBoxplot(cset1, coverage=0.50, type="area", factor=1)
plot(bp)
plot(bp) + ggplot2::theme(legend.position="bottom")
plot(bp) + ggplot2::theme(legend.position="none")
plot(bp, plot_outliers=FALSE)
}
Run the code above in your browser using DataLab