Description Usage Arguments Details Value Author(s) See Also Examples
This function calculates the statistical measures needed to visualize the boxplot of a numeric vector.
1 |
x |
The input numeric vector |
c |
Determines the length of the "whiskers" plot. If it is equal to zero or out=F, no outliers will be returned. |
c.width |
The width level is determined 0.15 times the square root of the size of the input vector |
out |
If TRUE the outliers will be computed at the selected "c" level (default is 1.5 times the Interquartile Range). |
tojson |
If TRUE the results are returned in json format |
This function returns a list with the parameters needed to visualize a boxplot.
Returns a list or a json file with the following components:
lo.whisker The extreme of the lower whisker
lo.hinge The lower "hinge"
median The median
up.hinge The upper "hinge"
up.whisker The extreme of the upper whisker
box.width The width of the box (default is 0.15 times the square root of the size of the vector)
lo.out The values of any data points which lie below the extreme of the lower whisker
up.out The values of any data points which lie above the extreme of the upper whisker
n The non-NA observations of the vector
Kleanthis Koupidis, Charalampos Bratsas
1 2 3 4 5 6 7 8 9 10 11 | # with vector as an input and the default parameters
vec <- as.vector(iris$Sepal.Width)
ds.box(vec)
# with vector as an input and the different parameters
vec <- as.vector(iris$Sepal.Width)
ds.box(vec, c = 3, c.width = 0.20 , out = FALSE, tojson = FALSE)
# OpenBudgets.eu Dataset Example:
amounts <- as.vector(Wuppertal_df$Amount)
ds.box(amounts, c = 1.5, c.width = 0.20, out = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.