R engine is an interpreter. Therefore, R is an interpreted language. In addition, R is a case-sensitive and functional language. Instead of typing commands, you call functions to perform an action. For example, to quit an R session, you need to call the q()
function. You should extensively comment your code. A comment starts with a hash mark (#
); you can use the comment anywhere in the line of code.
Any code after the start of the comment does not execute. A semicolon (;
) is a command delimiter if you write more than one command in a single line. A new line is the command delimiter as well. The following code example shows a comment, displays my R version, and lists the authors and other contributors to the language using the contributors()
function:
# R version and contributors R.version.string contributors()
Here, I am only showing the version I am currently using. Note that by the time you read this book, you might already have a newer version:
"R version 3...