R lists and maps
Work with ordered lists and key-value lookups. Follow a pickup roster, change a booking, or combine stock counts from two deliveries.
Lists · build and edit
- Append a vector element with cAdd the last student to the bus register
- Logical vector subsettingClear empty stock bins from the pick list
- Negative index exclusionTake a cancelled item off a packing list
- Vector element replacementCorrect the second stop on a shuttle route
- appendInsert two pickup stops before the depot
- trimws on a character vectorClean the names on two visitor badges
Lists · positions and ranges
- Double bracket extractionRead the second name on the pickup roster
- Vector range indexingSelect two orders for the packing bench
- revRead a receipt history newest first
Maps · look up and assign
- Assign only a missing bindingKeep the first reservation for a seat
- Named list assignmentUpdate the count for a shelf label
- exists in an environmentFind a parcel whose driver is still unassigned
- get0Show a balance for an item never received
Maps · combine and transform
- Named list of vectorsGroup two parcels on one delivery route
- Named vector assignmentKeep the price shown on yesterday's menu
- names and ordered subscriptsPrint shelf totals in aisle order