-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
The ultimate test of whether something can be assigned to is to actually try assigning to it.
It may therefore make sense to replace the
if(.validLHS(xn,parent.frame())){ #If x not anonymous, set in calling env
on.exit(eval.parent(call('<-', xn, x)))
}
invisible(x) pattern with the much simpler
on.exit(try(eval.parent(call('<-', xn, x)), silent = TRUE))
invisible(x) or, since we don't care about the try-error object,
on.exit(tryCatch(eval.parent(call('<-', xn, x)), error = function(e){}))
invisible(x) Thoughts? @CarterButts ?
Metadata
Metadata
Assignees
Labels
No labels