Hello world in R

This post is to illustrate how to write a simple hello world program in R.

To do this download R from here and install it on your system.

R is available on Windows, Mac as well as Linux platforms.

Once you install R, open R and you should see something like this R-basic

Now go to File menu and select New Script In the new file, let us code to print out the introductory Hello World! by giving the following code

 print("Hello World") 

Now save your code as Hello World.R 

Congrats, you have successfully saved an R file. Now it’s time to execute.
Select the code in the file and hit Ctrl+R. You can see output in R console behind
as follows
hello-world-R

That’s it. You have successfully created your first R program and executed it successfully 🙂

Author: Krishna

Data Analytics Enthusiast

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s