Learn R Programming

MadanTextNetwork (version 0.1.0)

FUNbigrams: Extract Bigram Information and Count Frequency

Description

This function processes a data frame containing bigrams and their frequency, and creates a new data frame with separated words and their frequencies.

Usage

FUNbigrams(tf.bigrams)

Value

A tibble data frame where each row represents a unique bigram from the input data. The data frame contains three columns: 'word1' and 'word2' representing the individual words in the bigram, and 'weight' representing the frequency of the bigram in the corpus. This structure facilitates further analysis of the bigram relationships and their occurrences.

Arguments

tf.bigrams

A data frame with bigram terms and their frequency.

Examples

Run this code
tf_bigrams <- data.frame(term = c("hello_world", "shiny_app"),
                         term_freq = c(3, 2))
bigram_info <- FUNbigrams(tf_bigrams)

Run the code above in your browser using DataLab