Digital historical methods in R