Standardized taxonomy for classifying recipes by domain. Supports hierarchical categories with parent-child relationships.
Methods
- $new(name, description, parent)
Constructor for creating a new category
- $is_subcategory_of(ancestor_name)
Check if this category is a subcategory of another
- $get_path()
Get full hierarchical path
- $equals(other)
Check equality by name
- $to_list()
Serialize to list for JSON
- $print(...)
Print category information
- $from_list(lst)
Class method to reconstruct from list (see details)
See also
Other tidy-api:
RecipeCertification,
RecipeUser,
add_category(),
certify_recipe(),
default_categories(),
filter_recipes(),
filter_workflows(),
find_workflows_for_recipe(),
list_recipes(),
list_workflows(),
rank_recipes(),
rank_workflows(),
recipe_category(),
recipe_certification(),
recipe_user(),
remove_category(),
search_recipes(),
search_workflows(),
set_user_info(),
set_version()
Public fields
nameCharacter. Category identifier.
descriptionCharacter. Human-readable description.
parentRecipeCategory or NULL. Parent category for hierarchy.
Methods
Method equals()
Check equality by name
Method print()
Print category
Examples
# Use recipe_category() for the public API:
cat <- recipe_category(
"economics", "Economic indicators"
)
sub <- recipe_category(
"labor_market", "Labor market",
parent = "economics"
)