ds.analysis {DescriptiveStats.OBeu} | R Documentation |
Calculation of some Descriptive Tasks
Description
The function calculates the basic descriptive measures, the correlation and the boxplot parameters of all the numerical variables and the frequencies of all the nominal variables.
Usage
ds.analysis(data, c.out = 1.5, box.width = 0.15, outliers = TRUE, hist.class = "Sturges",
corr.method = "pearson", fr.select = NULL, tojson = FALSE)
Arguments
data |
The input data |
c.out |
Determines the length of the "whiskers" plot. If it is equal to zero no outliers will be returned. |
box.width |
The width level is determined 0.15 times the square root of the size of the input data. |
outliers |
If TRUE the outliers will be computed at the selected "c.out" level (default is 1.5 times the Interquartile Range). |
hist.class |
The method or the number of classes for the histogram. |
corr.method |
The correlation coefficient method to compute: "pearson" (default), "kendall" or "spearman". |
fr.select |
One or more nominal variables to calculate their corresponding frequencies. |
tojson |
If TRUE the results are returned in json format |
Details
This function returns a list with the basic statistics, the parameters needed to visualize a boxplot and a histogram, it also provides the frequencies of non numerical data of the input dataset and the correlation coefficient. The input of this function can be a matrix or data frame.
Value
A list or json file with the following components:
descriptives The descriptive measures
boxplot The statistics of the boxplot
histogram The histogram parameters
frequencies The frequencies and the relative frequencies of factors/characters of the input dataset
correlation The correlation coefficient
Author(s)
Kleanthis Koupidis, Charalampos Bratsas
See Also
Examples
# iris data frame as input with the default parameters
ds.analysis(iris)
# using iris data frame with different parameters
ds.analysis(iris, c.out = 1, box.width = 0.20, outliers = TRUE, tojson = TRUE)
# using iris data frame with different parameters
# fr.select parameter specified as Species
ds.analysis(iris, c.out = 1, outliers = FALSE, fr.select = "Species", tojson = TRUE)
# OpenBudgets.eu Dataset Example:
ds.analysis(Wuppertal_df, c.out = 2, box.width = 0.15,
outliers = FALSE, tojson = FALSE)