The R language is a powerful open source functional programming language. At its core, R is a statistical programming language …