[R] how to get a primitive function object
Duncan Murdoch
murdoch at stats.uwo.ca
Fri Jan 23 12:51:17 CET 2009
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
More information about the R-help
mailing list