Document similarity was calculated using tidytext package and widyr package. like this..
library(janeaustenr) library(dplyr) library(tidytext) # Comparing Jane A