Description Usage Arguments Value See Also Examples
Create multiple documents from a data.frame
,
or vector
of characters.
1 2 3 4 5 6 7 8 9 10 | to_documents(documents, ...)
## S3 method for class 'character'
to_documents(documents, ..., type = c("string",
"token", "ngram"))
## S3 method for class 'data.frame'
to_documents(documents, ..., text, title = NULL,
language = NULL, author = NULL, timestamp = NULL,
type = c("string", "token", "ngram"))
|
documents |
A |
... |
Not actually being used. |
type |
Type of |
text |
Bare column name containing data. |
title, language, author, timestamp |
Bare column name
to metadata to add to documents, see |
An object of class documents
.
documents
to read a single document.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ## Not run:
init_textanalysis()
docs <- c(
"This is a document.",
"This is another document."
)
to_documents(docs)
docs_df <- tibble::tibble(
txt = docs,
title = c("A", "B")
)
to_documents(docs_df)
title_(docs_df)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.