swirldev / swirl_courses

:mortar_board: A collection of interactive courses for the swirl R package.
http://swirlstats.com
Other
4.32k stars 7.24k forks source link

There is a typo in R Programming : Subsetting Vectors. #413

Open baif666 opened 6 years ago

baif666 commented 6 years ago

|============================================================= | 64% | Luckily, R accepts negative integer indexes. Whereas x[c(2, 10)] gives us ONLY the 2nd and 10th elements of x, | x[c(-2, -10)] gives us all elements of x EXCEPT for the 2nd and 10 elements. Try x[c(-2, -10)] now to see this.

10th maybe better.

johncassil commented 5 years ago

Submitted pull request 444 to fix this.