8.6: Answers to exercises
Answer to the question about mistake. This is it:
Code \(\PageIndex{1}\) (R):
Here should be
Code \(\PageIndex{2}\) (R):
By the way, non-paired brackets (and also non-paired quotes) are among the most frequent mistakes in R .
Even more, function seq() makes vector so function c() is unnecessary and the better variant of the same command is
Code \(\PageIndex{3}\) (R):
Now the truth is that there are two mistakes in the text. We are sorry about it, but we believe it will help you to understand R code better. Second is not syntactic mistake, it is more like inconsistency between the text and example. Please find it yourself.