R/wc.R

Defines functions wc

wc <- 
function(text.var) {
    y <- tolower(clean(Trim(gsub(".*?($|'|[^[:punct:]]).*?", 
        "\\1", as.character(text.var)))))
    length(unlist(strsplit(gsub("\\s+", " ", y), "\\s")))
}

Try the reports package in your browser

Any scripts or data that you put into this service are public.

reports documentation built on May 2, 2019, 8:29 a.m.