I have very many (~1 million) txt files, that each contain written text (on average 1000 words per txt written as in a book, a screenshot from a txt with fewer words is attached here:
).
I wish to create a table in R with two columns and 1 million rows: column 1 is the name of the txt file, column 2 is all text in the txt file with one row per txt file.
I have two challenges with this (to which I have not found answers on stackoverflow yet):
- My txt file is written text, however it is formatted as very many rows and columns (in an unstructured manner, each txt-file being different from one another). Thus I need a function that takes ALL text that is in the txt and treats it as one "cell". And
- I have not found a function yet that allows me to upload so many txt files and integrate them into on large table (without R stopping to work). Is there a smart solution to that?