Learn R Programming

SpeedReader (version 0.9.1)

order_by_counts: A function to generate an ordered word count dataframe from a raw vector of words.

Description

A function to generate an ordered word count dataframe from a raw vector of words.

Usage

order_by_counts(word_vector, weighting = NULL)

Arguments

word_vector

A character vector of words we wish to count and order.

weighting

a vector of weightings to be given to counts of a particular string. Defaults to NULL meaning no weightings will be used.

Value

A data.frame with 'word' and a 'count' fields, with rows ordered by word frequency.