extract_match {poldis}R Documentation

Extract text matches

Description

Get texts in which certain "matches" occur.

Usage

extract_match(v, match, invert = FALSE, ignore.case = TRUE)

Arguments

v

Text vector or annotated data frame.

match

A regex match for a word(s) or expression. For multiple words, please use "|" to divide them.

invert

Do you want texts without certain matches to be returned? By default FALSE.

ignore.case

Should case be ignored? By default, TRUE.

Value

A list the same length as text variable.

Examples


extract_match(c("This function was created on the 29 September 2021",
"Today is October 12, 2021"), "October")


[Package poldis version 0.1.1 Index]