ds.analysis: Calculation of some Descriptive Tasks

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/ds.analysis.R

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

1
2
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:

Author(s)

Kleanthis Koupidis, Charalampos Bratsas

See Also

open_spending.ds

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# 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)
                

DescriptiveStats.OBeu documentation built on May 4, 2020, 9:06 a.m.