class Rserve::REXP::Environment
REXPEnvironment represents an environment in R. Very much like {@link org.rosuda.REngine.REXPReference} this is a proxy object to the actual object on the R side. It provides methods for accessing the content of the environment. The actual implementation may vary by the back-end used and not all engines support environments. Check {@link org.rosuda.REngine.REngine.supportsEnvironments()} for the given engine. Environments are specific for a given engine, they cannot be passed across engines
Attributes
Public Class Methods
create a new environemnt reference - this constructor should never be used directly, use {@link REngine.newEnvironment()} instead.
-
@param eng engine responsible for this environment
-
@param handle handle used by the engine to identify this environment
Rserve::REXP::new
# File lib/rserve/rexp/environment.rb, line 10 def initialize(e,h) super() @eng = e @handle = h end
Public Instance Methods
assigns a value to a given symbol name
@param name symbol name @param value value */
# File lib/rserve/rexp/environment.rb, line 29 def assign(name, value) @eng.assign(name, value, self) end
# File lib/rserve/rexp/environment.rb, line 15 def environment? true end
get a value from this environment
-
@param name name of the value
-
@param resolve if
false
returns a reference to the object, iffalse
the reference is resolved -
@return value corresponding to the symbol name or possibly
null
if the value is unbound (the latter is currently engine-specific)
# File lib/rserve/rexp/environment.rb, line 23 def get(name, resolve=true) @eng.get(name,self,resolve) end
# File lib/rserve/rexp/environment.rb, line 32 def parent(resolve=true) @eng.get_parent_environment(self,resolve) end