In my console ,i can not delete objects ,why?
> ls()
[1] "f1" "f2" "getmail" "k" "mail" "pattern" "rm" "word" "x"
> rm(k)
Error in rm(k) : unused argument(s) (k)
> rm("k")
Error in rm("k") : unused argument(s) ("k")
You have overwritten the rm object with an own object called rm:
> ls() [1] "f1" "f2" "getmail" "k" "mail" "pattern" "rm" "word" "x"
So when you write rm(something) it’s not calling the original rm but your own. To call the original rm, use
originalRm <- get('rm', baseenv())
originalRm(object)
# or, simpler:
base::rm(object)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With