# Illustrate the concept of deepest regression line in the case of simple
# linear regression.
data(stars)
plot(stars, pch=16)
result <- rdepthmedian(x = stars)
abline(result$deepest, col="blue", lwd=2)
x <- matrix(rnorm(3000), ncol = 3) + 10
rdepthmedian(x = x)
Run the code above in your browser using DataLab