And so for example the lm function here which

fits linear models to data has this argument list here.

So the first is the formula, the second is

the data And then subset, the weights et cetera.

And you see that the first five arguments here don't have any default value.

So, the user has to specify them.

So the but then the method, the model, the X argument, they all have

default values so if you don't specify

them they will use those values by default.

And so the following two function calls are equivalent.

I could have specified the data first and then the formula and then the model.

And then, and then, and then the subset arguments

or I could specify the formula first, the data second,

the subset and then say model is equal to false.

Now the reason why the first one is okay is

because I, so I matched the data argument by name.

You can imagine that that's kind of taken out of the argument

list now, then Y till the X doesn't, isn't specified by name.

So it's given to the first argument that hasn't already been matched.

And I, in which case that's the formula.

Model equal to false, so that's been matched by name so

I can kind of get rid of that from the argument list.

And then 1 through 100 has to be assigned

to the argument that has not yet already been matched.

So in this case formula was already matched, data was already matched.

And so the next one is subset.

So 1 to 100 get's assigned to the subset argument.

So this is somewhat a confusing way to call lm,

and I don't recommend that you do it this way.

But, I, I wrote it this way just to demonstrate

how positional matching, and matching by name can work together.

A common usage for lm though is the second

version here. Which say lm Y til the X.

So there is a formula there.

And then the next one is mydata, which the

data set which you're going to grab the data from.

The subset argument and then, so the first three arguments,

you know, are commonly specified, every time you call lm.

But then, the rest you may or may not specify and so

you may, if you just want to specify one of the following arguments.

It's easier just to call it out by name.