I'm writing an R package, where users are expected to run transform the data with my function in the way that is bound to fail. I want to add two examples to this function - one where the "default" run throws an error, and the second where the data is quite aggressively filtered (can't make this a default).
How do I add the example for the first case, where the code is bound to fail?
You can add it within a \dontrun{} block so that it does not cause errors. http://r-pkgs.had.co.nz/man.html#man-functions