R Studio is an integrated development environment for R, available as open source and commercial software for various platforms. It features a user-friendly interface with panels for console, environment, history, files, plots, packages, help, and viewer, facilitating programming and data management. Users can create projects, set working directories, and perform operations like installing and loading packages easily within R Studio.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
25 views18 pages
R and R-Studio
R Studio is an integrated development environment for R, available as open source and commercial software for various platforms. It features a user-friendly interface with panels for console, environment, history, files, plots, packages, help, and viewer, facilitating programming and data management. Users can create projects, set working directories, and perform operations like installing and loading packages easily within R Studio.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 18
R and R-Studio
Dr. Rakhee Chhibber
Introduction to R studio • R Studio is an integrated development environment(IDE) for R. IDE is a GUI, where you can write your quotes, see the results and also see the variables that are generated during the course of programming. R Studio is available as both Open source and Commercial software. R Studio is also available as both Desktop and Server versions. R Studio is also available for various platforms such as Windows, Linux, and macOS. Left top panel • The console panel(left panel) is the place where R is waiting for you to tell it what to do, and see the results that are generated when you type in the commands. Top Right corner Environmental/History panel which contains 2 tabs: • Environment tab: It shows the variables that are generated during the course of programming in a workspace that is temporary. • History tab: In this tab, you’ll see all the commands that are used till now from the start of usage of R Studio. Right Bottom • To the right bottom, you have another panel, which contains multiple tabs, such as files, plots, packages, help, and viewer. • which contains multiple tabs, such as files, plots, packages, help, and viewer. • The Files tab shows the files and directories that are available within the default workspace of R. • The Plots tab shows the plots that are generated during the course of programming. • The Packages tab helps you to look at what are the packages that are already installed in the R Studio and it also gives a user interface to install new packages. • The Help tab is the most important one where you can get help from the R Documentation on the functions that are in built-in R. • The final and last tab is that the Viewer tab which can be used to see the local web content that’s generated using R. The console panel(left panel) is the place where we can see the results of the commands. oThe Files tab shows the files and directories that are available within the default workspace of R. oThe Plots tab shows the plots that are generated during the course of programming. oThe Packages tab helps you to look at what are the packages that are already installed in the R Studio and it also gives a user interface to install new packages. oThe Help tab is the most important one where you can get help from the R Documentation on the functions that are in built-in R. oThe final and last tab is that the Viewer tab which can be used to see the local web content that’s generated using R. Features of R - studio • A friendly user interface • writing and storing reusable programmes • All imported data and newly created objects (such as variables, functions, etc.) are easily accessible. • Comprehensive assistance for any item Code autocompletion • The capacity to organise and share your work with your partners more effectively through the creation of projects. • Plot snippets • Simple terminal and console switching • Tracking of operational history • There are numerous articles from RStudio Support on using the IDE. Set the working directort • 2 ways 1, using getwd () function on console 2. Using GUI Create an Rstudio project • Step 1: Select the FILE option and select create option. Step 2: Then select the New Project option. Step 3: Then choose the path and directory name. Navigating directories in R studio getwd(): Returns the current working directory. setwd(): Set the working directory. dir(): Return the list of the directory. sessionInfo(): Return the session of the windows. • date(): Return the current date How to Perform Various Operations in RStudio •Installing R packages •Syntax: •install.packages('package_name') •Loading R package •Syntax: •library(package_name) •Help on an R package •help(package_name)