Skip to contents

Outputs the most processed queries

Usage

kwr_queries(kwr, q = NULL)

Arguments

kwr

A kwresearch object.

q

An optional regular expression to filter the output queries.

Value

A tibble with queries.

Examples

queries <- data.frame(
  query = c("seo", "keyword research"),
  volume = c(1000, 500)
)
kwr <- kwresearch(queries)

recipe_file <- file.path(tempdir(), "my-recipes.yml")
kwr_add_pattern(
  pattern = "seo",
  recipe_file = recipe_file,
  recipe_type = "label",
  dim_name = "my_label"
)
kwr <- kwr_classify(kwr, recipe_file)
#> Label:my_label
kwr_queries(kwr)
#> # A tibble: 2 × 8
#>   query_normalized my_label n_queries volume   cpc query_original   input source
#>   <chr>            <chr>        <int>  <dbl> <dbl> <chr>            <chr> <chr> 
#> 1 seo              seo              1   1000    NA seo              NA    NA    
#> 2 keyword research NA               1    500    NA keyword research NA    NA    

file.remove(recipe_file)
#> [1] TRUE