gen_outlier | R Documentation |
generate outliers from a series of number
gen_outlier(
x,
n,
digits = 0,
side = "both",
lim = NULL,
assign_n = NULL,
only_out = TRUE
)
x |
number vector |
n |
number of outliers to generate |
digits |
the digits of outliers |
side |
should be one of |
lim |
a two-length vector to assign the limitations of the outliers
if method is |
assign_n |
manually assign the number of low outliers or
high outliers when method is |
only_out |
only return outliers |
number vector of outliers
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.