get_rank_diff: Calculate the if-idf rank differences.

View source: R/get_rank_diff.R

get_rank_diffR Documentation

Calculate the if-idf rank differences.

Description

Implementation of a simple algorithm to find the difference between two corpora. The relative importance of the terms in tidy_x are compared to the importance tidy_y.

Usage

get_rank_diff(tidy_x, tidy_y, id = "id", token = "token")

Arguments

tidy_x

A data frame created by tidytext::unnest_tokens()

tidy_y

A data frame created by tidytext::unnest_tokens()

id

string. Name of id variable. Defaults to "id".

token

string. Name of token variable. Defaults to "token".

Value

Returns a data frame.

Examples

## Not run: 
rank_diff <- get_rank_diff(tidy_x, tidy_y, id = "id", token = "token")

## End(Not run)


Kudusch/ktools documentation built on Oct. 30, 2022, 10:13 p.m.