# NOT RUN {
set.seed(0)
x <- as.data.frame(cbind(
"normal" = rnorm(1000),
"gamma" = rgamma(1000, shape = 2)))
res1 <- stress(type = "user", x = x, new_weightsfun = function(x)x ^ 2, k = 1)
## plot user defined weights against the first column of x.
plot(x$normal, get_weights(res1), pch = ".")
# }
Run the code above in your browser using DataLab