Description Usage Arguments Details Author(s) See Also Examples
This function calculates the frequencies and the relative frequencies of factors/characters of the input dataset.
1 | ds.frequency(data, select = NULL, tojson = FALSE)
|
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 |
This function returns a list with the frequencies and relative frequencies of factors/characters of the input dataset.
Kleanthis Koupidis, Charalampos Bratsas
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.