Let's use the Semiconductor Capability sample data table for context.
Column lot_id has 13 levels.
Say I want to IMR control chart the last lot only or only the last 5 lots in the data table. Is there an elegant way to do this kind of last n filtering other than manually scrolling through the list of lot_id and manually picking the last 5 lots?
Alternatively, I have years of process sensor data in my data table. I only want to plot the last six months worth.