Chapter 6. R Syntax
This chapter contains an overview of R syntax. It’s not intended to be a formal or complete description of all valid syntax in R, but just a readable description of valid R expressions.
It is possible to write almost any R expression as a function call. However, it’s confusing reading lots of embedded function calls, so R provides some special syntax to make code for common operations more readable.[16]
[16] You could write R code as a series of function calls with lots of function calls. This would look a lot like LISP code, with all the parentheses. Incidentally, the S language was inspired by LISP and uses many of the same data structures and evaluation techniques that are used by LISP interpreters.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access