Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/ds.statistics.R
This function calculates the basic descriptive measures of the input dataset.
1 | ds.statistics(data, tojson = FALSE)
|
data |
A numeric vector, matrix or data frame |
tojson |
If TRUE the results are returned in json format, default returns a list |
This function returns the following values of the input data: minimum, maximum, range, mean, median, first and third quantiles, variance, standart deviation, skewness and kurtosis.
A list or json file with the following components:
Min The minimum observed value of the input data
Max The maximum observed value of the input data
Range The range, defined as the difference of the maximum and the minimum value.
Mean The average value of the input data
Median The median value of the input data
Quantiles The 25% and 75% percentiles
Variance The variance of the input data
Standard Deviation The standard deviation of the input data
Skewness The Skewness of the input data
Kurtosis The Kurtosis of the input data
Aikaterini Chatzopoulou, Kleanthis Koupidis, Charalampos Bratsas
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | # with matrix as an input and json outpout
Matrix <- cbind(
Uni05 = (1:200) / 21, Norm = rnorm(200),
`5T` = rt(200, df = 5), Gam2 = rgamma(200, shape = 2)
)
ds.statistics(Matrix, tojson = TRUE)
# with vector as an input
vec <- as.vector(iris$Sepal.Width)
ds.statistics(vec, tojson = FALSE)
# with iris data frame as an input
ds.statistics(iris, tojson = FALSE)
# OpenBudgets.eu Dataset Example:
ds.statistics(Wuppertal_df$Amount, tojson = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.