R is an Open Source implementation of the well-known S language. It works on multiple computing platforms and can be …