(Section 1.1)
Type this into your Console:
Then press Enter. You should get:
## Hello, World!
Computer Program
A sequence of instructions that performs a specific task when executed by a computer.
cat()
cat()
is a functionhelp(cat)
?cat
“Hello World!” is a string.
String
A value in a computer program that constitutes text (as opposed to numbers or some other type of data).
cat()
can process strings. Strings are delimited by quote-marks.
Delimiter
A character in a programing language that is used to mark the beginning and/or end of a value.
cat()
can also process numbers to the console.Try:
We are working in interactive mode.
Interactive Mode
A type of engagement between a human and a computer in which the computer prompts the humand for data and/or commands and may respond with output that the human can read and/or interpret.
The >
in the Console is the prompt.
Read-Evaluate-Print Loop
An interactive cycle in which the R-interpreter reads an expression from the console, evaluates it, and prints out the value to the console.
You don’t need a cat()
command to see a value.
(But there is some odd “extra” processing.)