Selecting multiple elements with [

  • For vectors, lists and data frames
  • Typically called ‘subsetting’
  • Also useful to reorder elements, e.g.:
    • rank elements
    • repeat elements (hence grow the object)

You get the same class back.