ds.hist {DescriptiveStats.OBeu}R Documentation

Histogram breaks and frequencies

Description

This function computes the histogram parameters of the numeric input vector. The default for breaks is the value resulted from Sturges algorithm.

Usage

ds.hist(x, breaks = "Sturges", tojson = FALSE)

Arguments

x

The input numeric vector, matrix or data frame

breaks

The method or the number of classes for the histogram

tojson

If TRUE the results are returned in json format, default returns a list

Details

The possible values for breaks are Sturges see nclass.Sturges, Scott see nclass.scott and FD or Freedman Diaconis nclass.FD which are in package grDevices.

Value

A list or json file with the following components:

Author(s)

Kleanthis Koupidis, Charalampos Bratsas

See Also

ds.analysis, open_spending.ds

Examples

# with a vector as an input and the defaults parameters
vec <- as.vector(iris$Sepal.Width)
ds.hist(vec)

# OpenBudgets.eu Dataset Example:
ds.hist(Wuppertal_df$Amount, tojson = TRUE)


[Package DescriptiveStats.OBeu version 1.3.2 Index]