rbitrary
rbitrary copied to clipboard
why you cannot rm(iris)
iris is a tortured dataset approaching a century of age. Why can't you rm it?
(or some other datasets like attitude)
attitude rm(attitude) iris rm(iris)
In both cases because they're inbuilt datasets; for the same reason you can rm() a user-defined function but not rm, say, as.data.frame.
This shouldn't actually be a cost; these datasets aren't loaded until you call them.
More fun: the following works (but doesn’t actually get rid of iris);
iris = iris
rm(iris)
(The first line assigns a new variable in the current environment, from where it’s deleted in the second line.)