```
HuberM(c(1:9, 1000))
mad (c(1:9, 1000))
set.seed(7)
x <- c(round(rnorm(1000), 1), round(rnorm(50, m=10, sd = 10)))
HuberM(x, conf.level=0.95)
if (FALSE) {
# scale zero
HuberM(rep(9, 100))
mad (rep(9, 100))
# bootstrap confidence intervals
HuberM(x, conf.level=0.95, ci.type="boot")
}
```

Run the code above in your browser using DataLab