Recap

Recap#

  • Like lists, vectors can be subset by index or with Boolean vectors.

  • Subsetting with Booleans allows you to extract subsets based on the values of vector elements.

  • Assigning values to a vector subset will result in the modification of a subset of entries in the original vector. But this only works if the values being assigned have length 1, or the same length as the subset to which the values are being assigned.