I have code where it is more convenient to call fixthrough do.call, rather than directly. Any old data frame will work for this example:
dfr <- data.frame(x = 1:5, y = letters[1:5])
The obvious first attempt is
do.call("fix", list(dfr))
Unfortunately this fails with
Error in fix(list(x = 1:5, y = 1:5)) : 'fix' requires a name
So we give him a name:
do.call("fix", list(dfr = dfr))
This time he fails with
Error in is.name(subx) : 'subx' is missing
It editdoesn’t work for recording either.
dfr <- do.call("edit", list(dfr = dfr))
Can someone think of a reasonable workaround, please?
EDIT: after reflection, I forgot that it fixalways discards its response to the global environment, which is great for test cases, but not so good for use with functions. Joshua's excellent workaround does not apply to edit.
For bonus points, what do you call editthrough do.call?