-
Book Overview & Buying
-
Table Of Contents
Learning R for Geospatial Analysis
By :
A function in R can have more than one parameter. In this section, we are going to get acquainted with supplying several arguments to such functions. At the same time, several new functions that take more than one argument will be introduced.
When specifying several arguments in a function, we need to assign each argument to the respective parameter using the usual assignment operator = during the function call, separating the assignment expressions for different parameters with commas.
For example, let's examine the seq function. Its most useful three parameters are from, to, and by (you can see in the function's help page that it has several more parameters). The seq function creates a sequential vector based on the input, as follows:
from: This parameter specifies from where to begin
to: This parameter specifies where to end
by: This parameter specifies the step size
Let's take a look at the following...
Change the font size
Change margin width
Change background colour