collex_prepare: Prepare data for collexeme/collocates analysis

Description Usage Arguments Value Examples

View source: R/corplingr_collex_prepare.R

Description

This function is designed to handle the output of colloc_default to generate a tidy data required as input of collex_fye for performing collexeme/collocate analysis.

Usage

1
collex_prepare(list_output = "list output of 'colloc_default()'", span = NULL)

Arguments

list_output

The list output of colloc_default.

span

character; the context-window span user wants to focus on for the collexeme/collocates analysis. For instance "r1", "l1", or a set of span windows as c("r1", "l1"). The default is NULL, indicating that all span defined from running colloc_default will be considered.

Value

A tbl_df (tibble data frame)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
# do the collocate search
df <- colloc_default(corpus_path = orti_bali_path[1:50],
                     pattern = "^nuju$",
                     window = "b", # focusing on both left and right context window
                     span = 3) # retrieve 3 collocates to the left and right of the node

# prepare the collexeme analysis input tibble
# and select to focus on R1 and R2 collocates.
collex_tb <- collex_prepare(df, span = c("r1", "r2"))

## End(Not run)

gederajeg/corplingr documentation built on Dec. 20, 2021, 9:50 a.m.