ngrams() function not found in NLP R package -
here code straight nlp.pdf. typed rstudio console. puzzled.
library("nlp") library("tm") s <- "the quick brown fox jumps on lazy dog" w <- strsplit(s, " ", fixed = true)[[1l]] ngrams(w, 3l) error: not find function "ngrams"
the ngrams function added in version 0.1-7. make sure have @ least version of package installed. can check version running looking @ sessioninfo() after run library(nlp). if version out of date, can use update.packages() update local package.
it's better check documentation that's included installed package rather separate pdf file. can bring package help(package="nlp"). have confined function not in version have installed.
Comments
Post a Comment