R Scripst applying some concepts of AI and Data Science