Every operation in R is a function call. For example, when you subset a vector using
, you’re really calling the function
This allows us to easily subset the elements of a list when the elements are vectors. For example, given a list of 3 elements: a character vector, an integer vector, and a logical vector, we can use
[ to easily extract the 2nd value from each vector.
To learn more, read the chapter on functions from Hadley’s book, Advanced R.