x <- seq(0, 100, 1)
gen_outlier(x, 10)
# generation limits
gen_outlier(x, 10, lim = c(-80, 160))
# assign the low and high outliers
gen_outlier(x, 10, lim = c(-80, 160), assign_n = c(0.1, 0.9))
# just generate low outliers
gen_outlier(x, 10, side = "low")
# return with raw vector
gen_outlier(x, 10, only_out = FALSE)
Run the code above in your browser using DataLab