Script command to check whether a selection criteria returns >0 selected rows
I'm looking for a scripting command that checks whether a selection contains >0 selected rows. The issue: subsetting a table of selected rows when none are selected, stops the script and returns an error message. I circumvent this problem by creating a column that sets selected rows to 1, then take col sum and run the if command (if col sum > 0, subset, don't subset). But that's clunky and for loo...