latest_issue function

Fetch the latest or earliest issue for each observation