I am doing for loop for many research papers. Here I want extract from read document a content.
How can I make that R reads only until last line, where many dots are, and indicate as an end-line? like on the picture below:
[Numbers] [Letter][Dots][Number]
If there is no many dots than stop and indicate as an end-line.
For example I have the following code but it doesn't work for other documents, cause sometimes have different endings.
if(((nrow(pdf[pdf$text == "References ." & pdf$element_id == '2',]) == 1) & !(exists("endline"))) == 1){
endline <- pdf$line_id[pdf$text == "References ." & pdf$element_id == '2']
}
R reads whole document and identifies only until the last where many dots are.