to_documents.Rd
Create multiple documents from a data.frame
,
or vector
of characters.
to_documents(documents, ...) # S3 method for character to_documents(documents, ..., type = c("string", "token", "ngram")) # S3 method for 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.
# 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) # }