Skip to contents

In other words, it lists queries that are contained in other queries.

Usage

kwr_subqueries(x, max_words = 5, min_words = 1, min_n = 1, min_volume = 0)

Arguments

x

A kwresearch object, which queries will be n-grams calculated from, or a data frame of queries and volume.

max_words

Maximum number of words in n-grams.

min_words

Minimum number of words in n-grams.

min_n

Minimum number of queries. Only the n-grams with at least this number of queries will be included.

min_volume

Minimum search volume per n-gram. Only the n-grams with at least this volume will be included.

Value

A tibble of n-grams with a basic stats (number of queries and sum of search volumes). The n-grams are ordered descendingly by number of queries and search volume. Use dplyr::arrange to change order.

Examples

queries <- data.frame(
  query = c("seo", "keyword research", "seo research"),
  volume = c(1000, 500, 100)
)
kwr <- kwresearch(queries)
kwr_subqueries(kwr)
#> # A tibble: 1 × 3
#>   token     n volume
#>   <chr> <int>  <dbl>
#> 1 seo       1    100