R/term_frequencies.R

Defines functions term_frequencies

Documented in term_frequencies

#' Calculate the term (vocabulary) frequencies
#' @param x path to (for now, xml) document
#' @return A table of frequencies

term_frequencies <- function(x){

x <- table(x) %>% sort(., decreasing = T)
return(x)

}
cownr10r/teachr documentation built on Nov. 4, 2019, 9:14 a.m.