run_search: Searches a series of strings for a specific query. Used...

View source: R/run_search.R

run_searchR Documentation

Searches a series of strings for a specific query. Used internally by run_lecat_analysis

Description

Search through a series for queries based on a regex query.

Usage

run_search(
  strings,
  query,
  regex = "\\bquery\\b",
  type,
  category,
  ids,
  column
)

Arguments

strings

Vector of strings to search through. Strings are from the chosen corpus.

query

String query term to search for in the strings. Taken from the chosen lexicon.

regex

String regular expression defining the strings should be searched. Defaults to searching for the query term with non word characters either side

type

String query type. Derived from lexicon type.

category

String query type. Derived from lexicon type.

ids

id of the string

column

String column name examined included in the returned dataframe

Value

dataframe with counts of the query in each string


WarwickCIM/lecat documentation built on Jan. 14, 2023, 4:43 a.m.