Skip to contents

Gets the names of all dimensions

Usage

kwr_dimension_names(df)

Arguments

df

A data frame to get dimension names from.

Value

A vector of names.

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 |>
  kwr_queries() |>
  kwr_dimension_names()
#> [1] "my_label"

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