kwr_add_pattern | R Documentation |
If the recipe_file
exists, it is loaded and the pattern
is inserted into
it. If the recipe_file
does not exist, it is created.
kwr_add_pattern( pattern = NULL, recipe_file = NULL, recipe_type = NULL, dim_name = NULL, value = NULL )
pattern |
A regular expression. |
recipe_file |
A YAML file, which the pattern should be saved in. |
recipe_type |
Recipe type. One of: 'remove', 'include', 'tag' or 'label'. |
dim_name |
Dimension name for recipe types 'tag' and 'label'. |
value |
Optional value for recipe types 'tag' and 'label'. |
Nothing.
recipe_file <- file.path(tempdir(), "my-recipes.yml") # Pruning recipe: kwr_add_pattern( pattern = "xyz", recipe_file = recipe_file, recipe_type = "remove" ) # Label recipe: kwr_add_pattern( pattern = "xyz", recipe_file = recipe_file, recipe_type = "label", dim_name = "my_label" ) file.remove(recipe_file)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.