Learn R Programming

quanteda (version 0.9.9-3)

kwic_split: split kwic results

Description

Helper function for kwic designed to parse sequence matches into contexts and keywords.

Usage

kwic_split(char, mask, window)

Arguments

char
character vector
mask
numeric vector with the same length as char where 1 indicate appearance of keywords
window
size of the pre and post contexts

Examples

Run this code
## Not run: 
# kwic_split(letters[1:5], c(0, 1, 1, 0, 1), window = 1)
# kwic_split(letters[1:5], c(1, 1, 1, 0, 1), window = 1)
# ## End(Not run)

Run the code above in your browser using DataLab