Tasks
- Read and work through the code in ch 7 in Introduction to R. It takes less time than you think, and you need the whole chapter to make sense of the loops sections towards the end. By the way, this is a brand new book which is very friendly, and I recommend you read the whole book, replicating the code in it as you go along.
- Did you get more than one .json file when you processed your PDF document(s) with daiR for our previous session? If so, try to write a loop that works through the .json files you got and creates one .txt file out of them, containing all the text from the pdf document you OCR-ed with daiR. Take a look at Jacob’s code which includes such a loop (kindly written by Thomas).
Additional resources
- Here is a short, useful video that quickly shows you some of the usages of loops: For loops in R.