oe_shannon: Compute Shannon entropy

View source: R/discursive_range.R

oe_shannonR Documentation

Compute Shannon entropy

Description

Internal function to compute Shannon entropy in relative word counts across a set of elements in a character vecotr. Entropy is re-scaled to range from 0 to 1. Function used in discursive_range().

Usage

oe_shannon(x)

Arguments

x

Character vector containing open-ended responses.

Value

Numeric vector with the same length as x.


discursive documentation built on July 9, 2023, 5:34 p.m.