Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

why you cannot rm(iris) #7

Open
pedroconcejero opened this issue Mar 16, 2016 · 2 comments
Open

why you cannot rm(iris) #7

pedroconcejero opened this issue Mar 16, 2016 · 2 comments

Comments

@pedroconcejero
Copy link

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)

@Ironholds
Copy link
Owner

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.

@klmr
Copy link

klmr commented Mar 28, 2016

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.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants