RStudio is an open-source development environment for the R language from Posit. It puts the code editor, the…