Skip to contents

count categories and save as csv

Usage

count_category(data, category, output_dir)

Arguments

data

data frame

category

character string representing the category

output_dir

character string representing the output directory

Value

save categories to folder /analysis/relative/categories/

Examples

df <- data.frame(
  category = c("A", "B", "A", "C", "B", "A"),
  value = 1:6
)

temp_dir <- tempdir()

count_category(df, "category", temp_dir)