ds.frequency: Barplot parameters

Description Usage Arguments Details Author(s) See Also Examples

View source: R/ds.frequency.R

Description

This function calculates the frequencies and the relative frequencies of factors/characters of the input dataset.

Usage

1
ds.frequency(data, select = NULL, tojson = FALSE)

Arguments

data

A vector, matrix or data frame which includes at least one factor/character.

select

Select one or more specific nominal variables to calculate their corresponding frequencies, if it's not specified the result corresponds to frequencies of every factor variable in the data.

tojson

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

Details

This function returns a list with the frequencies and relative frequencies of factors/characters of the input dataset.

Author(s)

Kleanthis Koupidis, Charalampos Bratsas

See Also

ds.analysis, open_spending.ds

Examples

1
2
3
4
5
6
7
8
# iris data frame as an input and a selected column to calculate its frequencies
ds.frequency(iris, select = "Species", tojson = FALSE)

# iris data frame as an input without a selected column and json output
ds.frequency(iris, tojson = TRUE)

# OpenBudgets.eu Dataset Example:
ds.frequency(Wuppertal_df, select = "Produkt", tojson = FALSE)

okgreece/DescriptiveStats.OBeu documentation built on Sept. 7, 2021, 6:32 p.m.