subject_classify {wpa} | R Documentation |
Create a new logical variable that classifies meetings by patterns in subject lines
Description
Take a meeting query with subject lines and create a new TRUE/FALSE column which classifies meetings by a provided set of patterns in the subject lines.
Usage
subject_classify(
data,
var_name = "class",
keywords = NULL,
pattern = NULL,
ignore_case = FALSE,
return = "data"
)
Arguments
data |
A Meeting Query dataset in the form of a data frame. |
var_name |
String containing the name of the new column to be created. |
keywords |
Character vector containing the keywords to match. |
pattern |
String to use for regular expression matching instead of
|
ignore_case |
Logical value to determine whether to ignore case when performing pattern matching. |
return |
String specifying what output to return. |
Examples
class_df <-
mt_data %>%
subject_classify(
var_name = "IsSales",
keywords = c("sales", "marketing")
)
class_df %>% dplyr::count(IsSales)
# Return a table directly
mt_data %>% subject_classify(pattern = "annual", return = "table")
[Package wpa version 1.9.1 Index]