fncBoxPlot: Functional boxplot based on Modified Band Depth

Description Usage Arguments Examples

View source: R/functional_boxplot.R

Description

Functional boxplot based on Modified Band Depth

Usage

1
fncBoxPlot(u, X = NULL, bands = c(0, 0.5), method = "MBD", byrow = NULL, ...)

Arguments

u

data matrix

X

reference set. If null u will be used as reference.

bands

limits for bands

method

depth method

byrow

byrow

...

other arguments passed to fncDepth

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
# some data:
x <- matrix(rnorm(200), ncol = 10)

fncBoxPlot(x, bands = c(0, 0.5, 1), method = "FM")
fncBoxPlot(x, bands = c(0, 0.5, 1), method = "FM", byrow = FALSE)

colnames(x) <- paste0("f", 1:ncol(x))
fncBoxPlot(x, bands = c(0, 0.5, 1), method = "FM")

# fncBoxPlot handles zoo and xts objects
library(xts)
x <- matrix(rnorm(200), ncol = 10)
time <- as.POSIXct(1:ncol(x) * 86400, origin = "1970-01-01")
x_xts <- xts(t(x), order.by = time)
fncBoxPlot(x_xts, bands = c(0, 0.5, 1), method = "FM")

data("katowice.airpollution")
pl <- fncBoxPlot(katowice.airpollution, bands = c(0, 0.5, 1), method = "MBD")
pl + ggtitle("Air pollution in Katowice") + labs(y= "pollination ", x = "hour ")

DepthProc documentation built on Feb. 4, 2022, 1:07 a.m.