Count the number of times variables are used across analyses
Source:R/calculate_descriptive_statistics.R
calculate_variable_counts.Rd
This function is used to count the number of times each variable is used across
the analyses in the dataset. The output is a tibble with the columns variable
and count
which contains the number of times each variable is used across the
analyses in the dataset.
Count the number of times variables are used across analyses
Usage
calculate_variable_counts(data, subset_name = character(1L))
Arguments
- data
A tibble of variables used in analyses of each dataset, for a given subset.
- subset_name
A character vector of length 1, the name of the subset of data being analysed.
Value
A tibble containing the number of times each variable is used across the analyses in the dataset.
Details
Takes a tibble of diversity data, i.e. data that is ready for computing Sorensen diversity indices and computes the number of times each variable is used across the analyses. Note, that the function does not group by dataset, as the layout of the dataset assumes that each variable within a given dataset does not occur in another dataset.