findFreqTerms: Find Frequent Terms

Description Usage Arguments Details Value Examples

View source: R/matrix.R

Description

Find frequent terms in a document-term or term-document matrix.

Usage

1
findFreqTerms(x, lowfreq = 0, highfreq = Inf)

Arguments

x

A DocumentTermMatrix or TermDocumentMatrix.

lowfreq

A numeric for the lower frequency bound.

highfreq

A numeric for the upper frequency bound.

Details

This method works for all numeric weightings but is probably most meaningful for the standard term frequency (tf) weighting of x.

Value

A character vector of terms in x which occur more or equal often than lowfreq times and less or equal often than highfreq times.

Examples

1
2
3

Example output

Loading required package: NLP
  [1] "\"is"            "\"none"          "\"opec"          "\"the"          
  [5] "\"we"            "(bpd)"           "(opec)"          "..."            
  [9] "1.2"             "13-nation"       "15-18"           "1985."          
 [13] "1985/86"         "1986,"           "1986/87"         "1987"           
 [17] "1987/88"         "20s,"            "285,000"         "500"            
 [21] "7.25"            "750"             "948,000"         "added."         
 [25] "address"         "adhering"        "against"         "agreed"         
 [29] "al-khalifa"      "al-qabas"        "al-sabah"        "all"            
 [33] "along"           "announced"       "any"             "apparently"     
 [37] "appeared"        "appears"         "approved"        "arabia's"       
 [41] "arabian"         "architect"       "areas"           "around"         
 [45] "aspen"           "average"         "back"            "bank"           
 [49] "bankers"         "barrels,"        "based"           "bbl."           
 [53] "benchmark"       "benefits"        "boost"           "both"           
 [57] "bpd."            "called"          "canada"          "canadian"       
 [61] "cash"            "change"          "changed"         "changes"        
 [65] "circumstance.\"" "clearly"         "closed"          "coast"          
 [69] "come"            "commitment"      "commodity"       "companies"      
 [73] "compared"        "consumption."    "countries"       "country"        
 [77] "country's"       "crossroads"      "crucial"         "cubic"          
 [81] "current"         "day"             "deal"            "december's"     
 [85] "december."       "decline"         "decrease"        "deficit"        
 [89] "denied"          "deposits"        "deputy"          "diamond"        
 [93] "did"             "difficulties"    "discounted"      "dlr"            
 [97] "dlrs."           "dollars"         "domestic"        "down"           
[101] "due"             "each"            "early"           "ecuador,"       
[105] "efp"             "embargo"         "embassy"         "emirates"       
[109] "emirates,"       "entering"        "estimate"        "estimates"      
[113] "even"            "export"          "falling"         "feb"            
[117] "february"        "first"           "fiscal"          "fiscales"       
[121] "fixed"           "forced"          "foreign"         "four"           
[125] "fully"           "future"          "general"         "given"          
[129] "grade,"          "grades"          "group,"          "guard"          
[133] "halt"            "high"            "hisham"          "hit"            
[137] "hope"            "however,"        "humanistic"      "impact"         
[141] "import"          "imports"         "imports."        "inc."           
[145] "increased"       "increasing"      "indonesia\"s"    "indonesia,"     
[149] "industry."       "instead"         "institute"       "intermediate"   
[153] "into"            "january,"        "keep"            "kingdom's"      
[157] "kuwait's"        "late"            "levels"          "light"          
[161] "limit"           "line"            "local"           "lost"           
[165] "louisiana"       "low"             "lower"           "lowered"        
[169] "lowest"          "made"            "main"            "major"          
[173] "march"           "market."         "markets."        "mckiernan"      
[177] "measures"        "meeting.\""      "mid"             "minister,"      
[181] "ministers"       "mitigate"        "mizrahi"         "mln,"           
[185] "month,"          "months"          "moves"           "much"           
[189] "named"           "nearing"         "net"             "neutral"        
[193] "next"            "nuclear"         "officials"       "oil,"           
[197] "oil."            "one,"            "opec\"s"         "opec's"         
[201] "organisation."   "organization"    "other"           "our"            
[205] "out"             "overseas"        "pact"            "pay"            
[209] "pct."            "petroliferos"    "planned"         "plant"          
[213] "port"            "position"        "positive"        "postings"       
[217] "predicted"       "president"       "press"           "pressure"       
[221] "pricing"         "private"         "probably"        "producer"       
[225] "projected"       "pronounced"      "public"          "published"      
[229] "put"             "quota."          "quotes"          "raise"          
[233] "rate"            "real"            "reduction"       "referring"      
[237] "refinery"        "reiterated"      "remain"          "remarks"        
[241] "return"          "revenue"         "revenues"        "review"         
[245] "rise"            "rise."           "risks"           "riyal"          
[249] "riyals"          "riyals."         "rule"            "said,"          
[253] "said:"           "say"             "saying"          "says."          
[257] "sector"          "self-imposed"    "selling"         "several"        
[261] "sharp"           "ship"            "shortfall"       "should"         
[265] "six"             "slightly"        "smaller"         "spa"            
[269] "spokeswoman."    "spot"            "state"           "steady"         
[273] "stick"           "strongly"        "studies,"        "support"        
[277] "sweet"           "take"            "taken"           "techniques."    
[281] "texaco"          "them"            "then"            "those"          
[285] "three"           "throughput"      "today,"          "today."         
[289] "trading"         "transaction"     "trust"           "trying"         
[293] "two"             "uncertainty"     "union"           "until"          
[297] "value"           "wam"             "wanted"          "weakness"       
[301] "weeks"           "what"            "while"           "who"            
[305] "winter"          "yacimientos"     "yanbu"           "year's"         
[309] "years"           "yesterday"       "yesterday."      "york"           
[313] "zone"           

tm documentation built on July 12, 2020, 3 p.m.