If the status of the kwresearch object is 'data', it changes to 'pruned' and pruned data is created from clean data. I pruned data already exists (i.e. status = 'pruned') then pruned data are pruned again.
Arguments
- kwr
A
kwresearch
object to be pruned.- recipe_file
A path to a recipe file in YAML format.
- quiet
If TRUE prints no messages.
Examples
queries <- data.frame(
query = c("seo", "keyword research", "nonsense"),
volume = c(1000, 500, 10)
)
kwr <- kwresearch(queries)
recipe_file <- file.path(tempdir(), "my-recipes.yml")
kwr_add_pattern(
pattern = "nonsense",
recipe_file = recipe_file,
recipe_type = "remove"
)
kwr <- kwr_prune(kwr, recipe_file)
#> Removing queries...
#> Removed 1 queries out of 3. Duration: 0.004s
file.remove(recipe_file)
#> [1] TRUE