Receive key stanza and sort the rows so that the missing values are last in the list. Leaves ordering of other rows unchanged otherwise.
sortStanza(
keyblock,
valvar = "value_new",
na.strings = c("\\.", "", "\\s+", "N/A")
)
keyblock, row re-arranged with missings last
a variable key, or section of rows
Default is "value_new", the column for sorting.
Stings to be treated as missing, along with R's NA symbol