R Substring Remove Last N Characters