[Rd] Is it a good idea or even possible to redefine attach?

Grant Rettke gcr at wisdomandwonder.com
Tue Aug 5 20:49:07 CEST 2014


Hi,

Today I got curious about whether or not I /could/ remove `attach' from
my system so:
- Backed it up
- Implemented a new one
- Like this

,----
| attach.old <<- attach
| attach <<- function(...) {stop("NEVER USE ATTACH")}
`----

I got the error:

,----
| Error: cannot change value of locked binding for 'attach'
`----

If I unlock `attach' I assume that I could stomp on it... however is
that even a good idea?

What will I break?

My goal was never to allow `attach' in my system, but it was just an
idea.

Kind regards,

Grant Rettke | ACM, ASA, FSF, IEEE, SIAM
gcr at wisdomandwonder.com | http://www.wisdomandwonder.com/
“Wisdom begins in wonder.” --Socrates
((λ (x) (x x)) (λ (x) (x x)))
“Life has become immeasurably better since I have been forced to stop
taking it seriously.” --Thompson



More information about the R-devel mailing list