I have a set of 301 pdfs that I analyze using the tm and the quanteda package With kwic I am looking for specific keywords Ultimately, I would like to obtain a table with the following columns: Author - Year - Keyword in Context
To my understanding, I have to add author and year as docvars - however, they are different for each PDF and I do not know how to assign the correct author and year per pdf.
I tried
pdf_texts <- readtext("filepath",
docvarnames = "filename")
this at least gives the files the names of the pdfs rather than calling them "text 1, 2, 3,..."
however, I would like them to have the name of the authors (which in this case equals their title) and the year as docvars