I didn't see how your function calling your dataset from your code.
Is get_abatment() misspelling? otherwise, what's the definition of this function?
Sorry it was a mistake in the function I was calling. I did change it to call the get_overlimit(dataset, limit) but it still did not work. I then switched to python and that seemed to work fine. I'm still not sure why the R script did not work