Wacek Kusnierczyk wrote:
Duncan Murdoch wrote:
You can use parent.frame() as the pos or envir argument to assign(),
and then the assignment happens in the caller's frame. And assign()
is also another way out if you overwrite <- with something that
doesn't work; just call it to reassign base::`<-` to it. Or just
rm(`<-`) to unhide the original one.
unless you have redefined rm as well, that is.
Right, but then there's remove, or base::rm. Unless you redefined
remove and `::`.
So here's the question for a frustrating contest: is it possible to
define enough functions in the global environment to render your R
session completely unrecoverable? (I think it probably is.) And what's
the minimal set, or the minimal script to brick your R? No manipulating
the search list or writing anywhere but the global environment is allowed.
Duncan Murdoch
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.