R/export_to_iramuteq.R
export_to_iramuteq.Rd
export_to_iramuteq()
export atomic vectors to files with the format
required by IRaMuTeQ for text corpuses (a collection of documents containing
text).
export_to_iramuteq(
x,
dir = utils::choose.dir(),
file_name = paste0(deparse(substitute(x)), ".txt"),
var_name = "respondent"
)
An atomic vector (usually a
character object) with a corpus (a collection of documents
containing text). Each element of x
will represent a document (e.g., a
response from a survey).
(optional) a string indicating the directory on where the
corpus files must be saved (default: utils::choose.dir()
).
(optional) a string indicating the file name of the corpus.
(optional) a string indicating the variable name for each
document. This is required by IRaMuTeQ for distinguish each document inside
a corpus (default: "respondent"
).
An invisible NULL
. This function don't aim to return values.
if (FALSE) {
if (requireNamespace("friends", quietly = TRUE)) {
export_to_iramuteq(head(friends::friends[[1]], 100),
dir = tempdir(), file_name = "test.txt")
}
}