library(curvHDR)
# Univariate curvHDR example:
xUniv <- c(rnorm(1000,-2),rnorm(1000,2))
gate1 <- curvHDRfilter(xUniv)
plot(gate1)
# Bivariate curvHDR example:
xBiva <- cbind(c(rnorm(1000,-2),rnorm(1000,2)),
c(rnorm(1000,-2),rnorm(1000,2)))
gate2 <- curvHDRfilter(xBiva)
plot(gate2)
# Trivariate curvHDR example:
if (FALSE) {
xTriv <- cbind(c(rnorm(1000,-2),rnorm(1000,2)),
c(rnorm(1000,-2),rnorm(1000,2)),
c(rnorm(1000,-2),rnorm(1000,2)))
gate3 <- curvHDRfilter(xTriv)
plot(gate3)
}
Run the code above in your browser using DataLab