Getting Started With R

Having worked as a software developer, I got familiar with technologies from PHP(CakePHP, Laravel), JavaScript, Android. In this process, I noticed myself that I need to broaden my skills further. So I decided to learn one of the most appealing programming language in the recent years. As I’m well taught that, sharing knowledge has helped mankind survive and evolve, hence I decided to start sharing my experience with R programming language and start writing article on this topic at least once a week. Hopefully my article would help you guys in the days to come.

My first post would just be a brief on getting started with the R programming language. So, let’s get started. I am currently using Ubuntu 15.10 so if you guys have different OS than mine, you can go through the following links:
For Mac user,
For Windows user,
And for the Ubuntu user,
In terminal,
sudo echo “deb trusty/” | sudo tee -a /etc/apt/sources.list

2 . Adding R to Ubuntu Keyring

gpg –keyserver –recv-key E084DAB9

gpg -a –export E084DAB9 | sudo apt-key add –

3. Install R-base:
sudo apt-get install r-base r-base dev
R-base would install the complete R system and r-base-dev package is required to the user who needs to compile R packages from source like package maintainers, or anyone installing packages with install.packages().

Or, simply go the for downloading R.

4. Now, to check the installed version you may go for:
R –version

5. Now the next step is installing IDE. I would prefer IDE from RStudio.
Go to and select the right package for your system.

6. Now open R studio.
7. On the Console, type getwd()
This would result to the working directory. For me it’s “/home/kushal”.
8. I created a new folder in “/home/kushal/R” and on the console, type setwd(“/home/kushal/R/”)
Similarly Windows and Mac user can use setwd(“”)
I prefer setting up a new directory only for the R. So I created a new folder R and set it as the working directory.

Now, you are ready for dealing with R. That’s it for today. Get ready for the next updates. I’ll be dealing with various builtin-data types in R.
PS: Being as a programmer, and writing my first posts, I might struggle and may not meet your expectation. So, I would be comfortable if you guys put your suggestions and comment on this post. Happy coding :)

Leave a Reply

Your email address will not be published. Required fields are marked *