Learn R Programming

phm (version 2.1.2)

freqPhrases: Display Frequent Principal Phrases

Description

Display the most frequent principal phrases in a phraseDoc object.

Usage

freqPhrases(pd, n = 10)

Value

A vector with the n most frequent principal phrases and their frequencies.

Arguments

pd

A phraseDoc object.

n

Number of principal phrases to display.

Examples

Run this code
tst=c("This is a test text",
      "This is a test text 2",
      "This is another test text",
      "This is another test text 2",
      "This girl will test text that man",
      "This boy will test text that man")
pd=phraseDoc(tst)
freqPhrases(pd, 2)

Run the code above in your browser using DataLab