R has a very powerful subscripting system and it is important to learn how to use it effectively. In this video we show several different ways in which vectors may be subscripted to achieve various effects. While we concentrate on subscripting vectors here, the use of index vectors, logical vectors, and names to subscript a data structure extend (with some modifications) to other classes of objects. Because logical vectors are very useful as subscripts, this video covers the most important logical comparison operators and methods in R. While watching this video you should open
Mod10Script.R and follow along with Example 7.
This video covers fundamental material of great importance for R
programming. If you have some prior experience with R, some of the
content here may be a review for you, but I strongly encourage you to watch this video anyway.