Last chance! 50% off unlimited learning
Sale ends in
# NOT RUN {
bag1 = data.frame(
"words" = c("this", "is", "a", "sample"),
"counts" = c(1, 1, 2, 1),
stringsAsFactors = FALSE
)
bag2 = data.frame(
"words" = c("this", "is", "another", "example"),
"counts" = c(1, 1, 2, 3),
stringsAsFactors = FALSE
)
ll = list("bag1" = bag1, "bag2" = bag2)
tfidf = bags_to_tfidf(ll)
# }
Run the code above in your browser using DataLab