
R Language Fundamentals 55
2.12.6 Other topics
One should be careful to differentiate between a side effect and a value.
A simple example of that difference comes from the print function. In the
following code we will use print to print the value of an object, which is a side
effect, and then we will show that the return value of the call to print is the
object itself. Hence, we have both a side effect and a value. All R functions
return values; sometimes the value is NULL, but a value is always returned. If
the last statement in the body of the function is a call to invisible, then the
value will not be printed, but it is still returned.
The code below