bt_update_core_kw_filter: Set relevant/classify based on keywords Use...

View source: R/bt_update_core_kw_filter.R

bt_update_core_kw_filterR Documentation

Set relevant/classify based on keywords Use bt_leads_df_kw_filter() keeping/discarding leads based on keywords

Description

Set relevant/classify based on keywords Use bt_leads_df_kw_filter() keeping/discarding leads based on keywords

Usage

bt_update_core_kw_filter(
  update.core,
  key.words,
  positive = T,
  filter.cols = c("act.title.en", "act.description.en", "act.title.ll",
    "act.description.ll"),
  case.sensitive = F,
  only.keep.matches = T,
  save.match.words = F,
  assign.relevance = T
)

Arguments

update.core

dataframe to be filtered

key.words

character vector of words/phrases to filter (regex)

positive

if F, entries containing the key.words will be discarded.

filter.cols

which columns to use for filtering

only.keep.matches

if True, sets all relevant/classify to 0 first

save.match.words

if True, add a column "key.words" containing all the words that generated matches

assign.relevance

if True, assign the relevant and classify 0/1 to the returned df. default is TRUE

Value

filtered dataframe

Examples

bt_update_core_kw_filter(update.core, c("(import|export) tariff", "illegal trade practices"), filter.cols = "act.title.en")

global-trade-alert/gtabastiat documentation built on June 4, 2023, 6:40 a.m.