BUG/TST fix nearest_cov, add tests against R