Skip to contents

Return the number of words in a string

Usage

n_words(x)

Arguments

x

a string

Value

vector of numbers

Examples

syn_end <- syn("end")
syn_end_words <- n_words(syn_end)
syn_end[syn_end_words <= 1]
#>   [1] "abandon"         "abort"           "accomplishment"  "acme"           
#>   [5] "afterglow"       "afterimage"      "aim"             "all"            
#>   [9] "allotment"       "allowance"       "annihilate"      "annihilation"   
#>  [13] "answer"          "apogee"          "archer"          "arrest"         
#>  [17] "astrology"       "athlete"         "attend"          "balance"        
#>  [21] "ballplayer"      "bane"            "baseballer"      "baseman"        
#>  [25] "batter"          "battery"         "belay"           "bell"           
#>  [29] "bit"             "bite"            "borderline"      "bound"          
#>  [33] "boundary"        "bourn"           "bowman"          "budget"         
#>  [37] "butt"            "by-end"          "by-purpose"      "cancel"         
#>  [41] "cap"             "catastrophe"     "catcher"         "cease"          
#>  [45] "ceiling"         "center"          "cessation"       "chaff"          
#>  [49] "check"           "checkmate"       "chip"            "chloroform"     
#>  [53] "chunk"           "circumscription" "climax"          "clip"           
#>  [57] "clipping"        "close"           "closing"         "closure"        
#>  [61] "coach"           "coda"            "collop"          "commission"     
#>  [65] "compass"         "competitor"      "complete"        "completing"     
#>  [69] "completion"      "conclude"        "conclusion"      "confine"        
#>  [73] "confines"        "constellation"   "consummation"    "contingent"     
#>  [77] "cracking"        "cricketer"       "crown"           "crumb"          
#>  [81] "culminate"       "culmination"     "cup"             "curtains"       
#>  [85] "cut"             "cutoff"          "cutting"         "deadline"       
#>  [89] "deadlock"        "deal"            "death"           "deathblow"      
#>  [93] "debris"          "decease"         "decipherment"    "decoding"       
#>  [97] "delimitation"    "demise"          "denouement"      "departure"      
#> [101] "desist"          "desistance"      "destination"     "destiny"        
#> [105] "destroy"         "desuetude"       "determinant"     "determination"  
#> [109] "determine"       "detritus"        "develop"         "die"            
#> [113] "disappear"       "discontinuance"  "discontinuation" "discontinue"    
#> [117] "disentanglement" "dispatch"        "dissolution"     "dividend"       
#> [121] "dole"            "dollop"          "doom"            "dying"          
#> [125] "end"             "endgame"         "ending"          "ensue"          
#> [129] "eventuate"       "execute"         "exit"            "expiration"     
#> [133] "expire"          "explanation"     "exterminate"     "extinction"     
#> [137] "extinguishment"  "extreme"         "extremity"       "fare"           
#> [141] "fatality"        "fate"            "filings"         "finale"         
#> [145] "finality"        "finalize"        "finding"         "finding-out"    
#> [149] "finis"           "finish"          "finishing"       "floor"          
#> [153] "follow"          "footballer"      "foredoom"        "fortune"        
#> [157] "fossil"          "fragment"        "Friday"          "frontier"       
#> [161] "future"          "game"            "games-player"    "gamester"       
#> [165] "go"              "goal"            "gob"             "gobbet"         
#> [169] "going"           "grave"           "guard"           "gun"            
#> [173] "half"            "halt"            "halver"          "hedge"          
#> [177] "helping"         "hold"            "holdover"        "hunk"           
#> [181] "husks"           "immolate"        "inevitability"   "infielder"      
#> [185] "interest"        "interface"       "interpretation"  "issue"          
#> [189] "jock"            "jumper"          "kill"            "kismet"         
#> [193] "knell"           "leaving"         "leavings"        "leftovers"      
#> [197] "limen"           "limit"           "limitation"      "line"           
#> [201] "lineman"         "liquidate"       "lockout"         "lot"            
#> [205] "lump"            "lynch"           "march"           "mark"           
#> [209] "martyr"          "martyrize"       "maturation"      "maturity"       
#> [213] "maximum"         "measure"         "meed"            "mess"           
#> [217] "mete"            "modicum"         "moiety"          "moira"          
#> [221] "morsel"          "nip"             "object"          "objective"      
#> [225] "offscourings"    "orts"            "outcome"         "outfield"       
#> [229] "outfielder"      "paring"          "parings"         "part"           
#> [233] "particle"        "parting"         "pass"            "passing"        
#> [237] "payoff"          "peak"            "percentage"      "perfect"        
#> [241] "perfection"      "period"          "perish"          "perishing"      
#> [245] "perorate"        "piece"           "pinnacle"        "planets"        
#> [249] "player"          "poison"          "poloist"         "portion"        
#> [253] "prey"            "proportion"      "prove"           "pugilist"       
#> [257] "purge"           "pursuit"         "quantum"         "quarry"         
#> [261] "quarterback"     "quietus"         "quintain"        "quit"           
#> [265] "quota"           "racer"           "rags"            "rake-off"       
#> [269] "rasher"          "ration"          "reason"          "refrain"        
#> [273] "refuse"          "release"         "relics"          "relinquish"     
#> [277] "remainder"       "remains"         "remnant"         "renounce"       
#> [281] "residue"         "residuum"        "resolution"      "resolve"        
#> [285] "resolving"       "rest"            "result"          "reward"         
#> [289] "riddling"        "ripeness"        "roach"           "rubbish"        
#> [293] "ruins"           "rump"            "sacrifice"       "sawdust"        
#> [297] "scoop"           "scourings"       "scrap"           "scraps"         
#> [301] "scratch"         "scrub"           "segment"         "shadow"         
#> [305] "shard"           "share"           "shaving"         "shavings"       
#> [309] "shiver"          "shred"           "skater"          "slaughter"      
#> [313] "slay"            "sleep"           "slice"           "sliver"         
#> [317] "smithereen"      "snack"           "snatch"          "snip"           
#> [321] "snippet"         "solution"        "solving"         "splinter"       
#> [325] "sport"           "sportsman"       "stake"           "stalemate"      
#> [329] "stand"           "standoff"        "standstill"      "stars"          
#> [333] "start"           "starve"          "stay"            "stitch"         
#> [337] "stock"           "stop"            "stoppage"        "straw"          
#> [341] "strike"          "stubble"         "stump"           "succumb"        
#> [345] "summit"          "survival"        "sweepings"       "tackle"         
#> [349] "tailback"        "target"          "tatter"          "teleology"      
#> [353] "term"            "terminal"        "terminate"       "termination"    
#> [357] "terminus"        "threshold"       "tip"             "to"             
#> [361] "top"             "toxophilite"     "trace"           "ultimate"       
#> [365] "unfold"          "unraveling"      "unriddling"      "unscrambling"   
#> [369] "unspinning"      "untangling"      "untwisting"      "unweaving"      
#> [373] "upshot"          "utmost"          "uttermost"       "vanish"         
#> [377] "vestige"         "walkout"         "waste"           "weird"          
#> [381] "windup"          "wingback"        "working"         "working-out"    
#> [385] "wrestler"