Given filenames, folder names, or the mixture of the two, the function will read texts in .txt or other separated files, and then write them into one .csv file. It helps those who prefer texts in a table format.
names of folders and files, obtained files may end with ".txt" or not , see below. Encoding for each file is auto-detected.
a .csv file that will contain texts. It must end with ".csv".
character vector that specifies what content, when it occupies a single line,
should be treated as
Whether a file is taken as
NA is judged by
scancn. " " (a space)
is also taken as
NA. However, you
can further decide what else is deemed as
NA, e. g., "404 ERROR", if your texts are from
websites. If a file cannot be accessed, the result to be
written in the corresponding cell of csv file will become
NA, and there will be a
message, but no error is raised.
In the .csv file, full filenames of txt occupy a column and fulltexts occupy another.
1 2 3 4 5 6
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.