Description Usage Arguments Value Examples
Converts character vector into a term frequency inverse document frequency (TFIDF) matrix
1 |
object |
Input object containing dictionary (column), e.g., wactor |
.x |
Text from which the tfidf matrix will be created |
A c-style matrix
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ## create wactor
w <- wactor(letters)
## use wactor to create tfidf of same vector
tfidf(w, letters)
## using the initial data is the default; so you don't actually have to
## respecify it
tfidf(w)
## use wactor to create tfidf on new vector
tfidf(w, c("a", "e", "i", "o", "u"))
## apply directly to character vector
tfidf(letters)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.