I'm working with Rserve via Ruby bindings. It's pretty trivial to establish a connection to Rserve, and I assume its a good idea to persist that connection globally to avoid the overhead of tearing it down and re-building it as needed (I'm not operating in a multi-threaded environment).
Since the objects defined will stick around, and potentially class with later operations, I want to clear them out. I've seen:
myvar = 1
rm(myvar)
However, I would rather re-initialize everything, to avoid having to manually keep track of whats defined. Is this possible? Is there a significant overhead associated with it if so?
rm(list=ls())
? – Fina?rm
:## remove (almost) everything in the working environment. ## You will get no warning, so don't do this unless you are really sure. rm(list = ls())
– Finarm(list=ls(all=TRUE))
will remove everything or more at least. – Hanoverian