Hello World Program in R Programming Language

R Programming Language / Overview of R Language

1040

Program:

> # We can use the print() function
> print("Hello World!")

Output:

[1] "Hello World!"

Explanation:

> # Quotes can be suppressed in the output
> print("Hello World!", quote = FALSE)
[1] Hello World!
> # If there are more than 1 item, we can concatenate using paste()
> print(paste("How","are","you?"))
[1] "How are you?"

In this program, we have used the built-in function print() to print the string Hello World!

The quotes are printed by default. To avoid this we can pass the argument quote = FALSE.

If there are more than one item, we can use the paste() or cat() function to concatenate the strings together.


This Particular section is dedicated to Programs only. If you want learn more about R Programming Language. Then you can visit below links to get more depth on this subject.