write_tokens: Write a tokens object to a text file
Description
This function writes an object of the class tokens to a text file. Each
token is written to a separate line. The file encoding is always "UTF-8".
This file can later be read with read_tokens().
Usage
write_tokens(x, file, ...)
Value
Invisibly, x.
Arguments
x
An object of class tokens.
file
Name of the output file.
...
Additional arguments (not implemented).
See Also
read_tokens()
Other writing functions:
write_assoc(),
write_conc(),
write_fnames(),
write_freqlist(),
write_txt(),
write_types()
.old_wd <- setwd(tempdir())
(tks <- tokenize("The old man and the sea."))
write_tokens(tks, "file_with_tokens.txt")
(tks2 <- read_tokens("file_with_tokens.txt"))
setwd(.old_wd)