I am still a beginner with R, so please excuse the probably easy question.
I am using the code:
textstat_readability(txt, measure = "all")
to measure some text statistics of txt files (e.g. FOG, number of words, number of sentences, etc). Txt in this case represents a place holder for the corpus I need.
The following code reads out my files in a table with the actual text I want to read out under "text".
readtext object consisting of 2 documents and 0 docvars.
1 45404-12In-13348776D3799406720P-Gl.txt "" Pierson "..."
2 80749-16In-18733768Y12826817152N-Gl.txt ""\xff\xfeT\n\n\n\n\n\n\n"..."
Unfortunately, when I want to define this as a corpus to be used in the textstat_readability function with:
Example_Corpus <- Corpus(readtext(paste0("~/Documents/Master/Masterarbeit/Datenset/Neu/Test/*")))
I get the error:
inherits(x, "Source") is not TRUE
The ideal end result would give me a table with the file names in the beginning and following the various textstat_readability measures.
I would appreciate any help a lot! Thank you!