grouped_sum_freqs {Rrepest} | R Documentation |
Grouped Frequencies
Description
Compute a DataFrame with frequency counts obtained from the sum of 'small.level' and 'big.level' after grouping, which can be used to calculate percentages.
Usage
grouped_sum_freqs(data, small.level, big.level, w = NULL)
Arguments
data |
(dataframe) Data to analize |
small.level |
(string vector) All variables to get grouped sum that will sum up to 100 |
big.level |
(string vector) Must be fully contained in variables from small.level |
w |
(string) Numeric variable from which to get weights (optional) |
Value
Dataframe with frequencies from the grouped sum of small.level and big.level used for getting percentages
Examples
grouped_sum_freqs(data = mtcars,small.level = c("cyl","am"),big.level = c("cyl"))
[Package Rrepest version 1.3.0 Index]