S is a powerful environment for the statistical and graphical analysis of data. It provides the tools to implement many …