Hello World
Part of the Fundamentals section of Coddy's R journey — lesson 2 of 78.
The "Hello World!" is a simple program that outputs Hello World! to the screen.
In R, we use print() to show words on the screen. The words go inside quotation marks.
Let's take a look at the "Hello World!" program in R:
print("Hello World!")Challenge
EasyUse the code view to write a program that outputs Hello World!
Note that anything inside quotation marks is case sensitive. For example:
print("Hello World!")print("hello world!")are different things (notice the capital letters in the first line).
Cheat sheet
To print in the console use print():
print("Hello World!")Text inside quotation marks is case sensitive.
Try it yourself
# TODO: Write your code hereThis lesson includes a short quiz. Start the lesson to answer it and track your progress.
All lessons in Fundamentals
4Operators Part 2
Logical Operators (AND, OR)Logical Operators Part 2 (NOT)Recap - Simple LogicVectorized Logic Part 1Vectorized Logic Part 22Variables and Data Types
Numeric Data TypeInteger Data TypeCharacter Data TypeLogical Data TypeChecking Data TypesNaming ConventionsMissing Values: NARecap - Variable Creation8Loops
For LoopWhile LoopBreakNext (Continue)Recap - FactorialSequence Generation (seq, :)Nested LoopsRecap - Dynamic Input3Operators Part 1
Arithmetic OperatorsInteger Division and ModuloAssignment OperatorsRecap - Simple MathComparison Operators6Basic IO
Print OutputCat for OutputOutput With VariablesReading Input with readline()Type Conversion BasicsRecap - Age CalculatorRecap - True or False9Functions
Declaring a FunctionFunction ArgumentsReturn ValuesRecap - Sigma FunctionRecap - Validation FunctionDefault Parameter Values