Some coding in R for scrapping