Adding finding duplicated data in R