ds.frequency {DescriptiveStats.OBeu} | R Documentation |
Barplot parameters
Description
This function calculates the frequencies and the relative frequencies of factors/characters of the input dataset.
Usage
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
Examples
# 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)
[Package DescriptiveStats.OBeu version 1.3.2 Index]