R-logo
After installing R and RStudio, the question is now how to start using R/RStudio. In this article, we’ll describe how to run RStudio and to set up your working directory.
Using R outside RStudio
If its your first time using R
cd // Change directory
mkdir // Make a directory
rmdir // Remove a directory
dir() // List all files and subdirectories in that directory
getwd() // To get the current working directory
setwd() // To set the current working directory
$ mkdir R
$ cd R/
$ R
$ q()
Launch RStudio under Windows, MAC OSX and Linux
After installing R and RStudio, launch RStudio from your computer “application folders”.
RStudio is a four pane work-space for 1) creating file containing R script, 2) viewing command histories, 3) typing R commands, 4) viewing plots and more.
> getwd()
[1] "C:/Users/Admin/Desktop"
> setwd("C:/Users/Admin/Documents/R")
A default working directory is a folder where RStudio goes, every time you open it. You can change the default working directory from RStudio menu under: Tools –> Global options –> click on “Browse” to select the default working directory you want.
Each time you close R/RStudio, you will be asked whether you want to save the data from your R session. If you decide to save, the data will be available in future R sessions.
This brings the end of this Blog. We really appreciate your time.
Hope you liked it.
Do visit our page www.zigya.com/blog for more informative blogs on Data Science
Keep Reading! Cheers!
Zigya Academy
BEING RELEVANT
Controlling immunological responses requires the cytokine interleukin-2 (IL-2), commonly referred to as IL-2 Human. It…
What is Mortgage Insurance? Mortgage insurance is a type of insurance policy designed to protect…
Through the standard form offers different advantages in mathematical calculations and scientific notation. Firstly, it…
Introduction Stress is a feeling caused by an external trigger that makes us frustrated, such…
Sociology is a broad discipline that examines societal issues. It looks at the meaningful patterns…
Some info about Inch Inches are a unique measure that persuades us that even the…