My first experience with R Language

This is my first experience of R programming language which I started learning recently.


Ojas Aklecha

a year ago | 2 min read

I recently started learning the R language because I am a Data Science enthusiast and I wanted to start my Data Science Journey. So, for that R Language was one of the best to start from.

So, for those who don’t know what is R Language. R is a programming language that is designed and made for statistical computing and graphical computing. It’s made by R Code Team and The R Foundation for Statistical Computing. It is designed by Ross Ihaka and Robert Gentleman.

As of now, it’s been 1 week learning R and I am using R studio for this. I have considerable skills in Python and MySQL. I also know a little bit about C and CPP. So, for me, R looks fairly similar to Python with a little bit of touch of C/CPP. Like most of the syntaxes (basics ones) are similar to Python-like for example print(“XYZ”) it’s the same in Python and R.

If you go to if-else and for-while loops in R, you can see that it has some similarities with C/CPP. Like, in C/CPP we use ' { } ' for pretty much-writing everything. In R also, we use ' { } ' just like C/CPP for writing something in the if-else function and in for-while loops which are unlike python where we use ' : '.

Simple If Else code in Python -



if a>b:

print(a," greater than ",b)


print(b," greater than ",a)

Simple If Else code in R -


a = as.integer(readline())

b = as.integer(readline())


print(paste0(a , " greater than ", b))


print(paste0(b ," greater than ", a))



And, since it’s different programming, it has its many unique elements of it too.

Apart from this using R Studio makes it very organized to code. In RStudio, you get 4 windows. One is a script (you have to open it though), another one is Console, then there's Environment window and then there are those files sections where you can see your files and plots, etc.

I think knowing Python (Specially) and C/CPP makes it R pretty easy to learn.

What do you people feel about this, tell me about your first experience with R in the comments? Have a great day/night ahead.

Note - I publish this article first on hashnode and now I am adding this here also.

Link to my hashnode article -


Created by

Ojas Aklecha

Undergrad student with CSE major. Part-time photographer, coder and developer, gamer. Passionate music listener. Wannabe traveler. Language lover and more...







Related Articles