Calculate distance from points to nearest coast

Perhaps the sf package will be valuable for calculating the distances between those two sets