Jim Hester

Results 413 comments of Jim Hester

If we implement it like previously and copy the srcref attribute of the function the srcref will be used for display, so the checking code won't be visible unless you...

We could define a print method for argufied functions that prints the original function definition rather than including the argufied expressions. It would have to store the original definition in...

This implementation above will work putting the return check right after the function arguments with a slight tweak. (swapping the `bod` indexes) However there isn't any way I can find...

Moving to `function_` completely breaks the ability to not use `argufy` and have the code still work though (or turn off the checks if they are making your code too...

I don't hate it, but it feels a slightly janky to me. It is also means you have to document the return twice (once in `@param`, once in `@return`). But...

I tried playing with that, the problem is the `?` expressions get evaluated from the inside out, so if you return `y` from the second `?` expression then the first...

Ok using `substitute()` seems to work, not sure why I didn't try it before, thank you for the suggestion! https://github.com/gaborcsardi/argufy/commit/1459e85a9212b8854d24fc3a691129279e98a597 has a prototype implementation that supports _both_ `f Error: is.integer(`_result_`)...

I am going to add some tests for this as well and updated the documentation. The current implementation _does_ actually work with `f

That seems like a good solution to me.

This happens because glue essentially does this right now ```r as.character(eval(parse(text = "1/3"))) #> [1] "0.333333333333333" ``` I could have glue call `format()` instead of `as.character()` ```r format(eval(parse(text = "1/3")))...