# NOT RUN {
# EXAMPLE 1
set.seed(123)
x <- mvrnorm(1000, c(0, 0), diag(2))
depthContour(x, colors = gray.colors)
# with points
depthContour(x, points = TRUE)
depthContour(x, points = FALSE, levels = 10)
# EXAMPLE 2
data(inf.mort, maesles.imm)
data1990 <- na.omit(cbind(inf.mort[, 1], maesles.imm[, 1]))
depthContour(data1990, n = 50, pmean = TRUE, mcol = "blue",
pdmedian = TRUE, mecol = "brown", legend = TRUE, points = TRUE,
depth_params = list(method = "LP"),
graph_params = list(
xlab = "infant mortality rate per 1000 live birth",
ylab = "against masles immunized percentage",
main = "L2 depth, UN Fourth Goal 2011 year"))
#EXAMPLE 3
data("france")
depthContour(france,
depth_params = list(method = "Tukey"),
points = TRUE
)
# }
Run the code above in your browser using DataLab