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



Public Class Methods

new(e,h) click to toggle source

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

# File lib/rserve/rexp/environment.rb, line 10
def initialize(e,h)
  @eng = e
  @handle = h

Public Instance Methods

assign(name, value) click to toggle source

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)
environment?() click to toggle source
# File lib/rserve/rexp/environment.rb, line 15
def environment?
get(name, resolve=true) click to toggle source

get a value from this environment

  • @param name name of the value

  • @param resolve if false returns a reference to the object, if false 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)
parent(resolve=true) click to toggle source
# File lib/rserve/rexp/environment.rb, line 32
def parent(resolve=true)


Generated with the Darkfish Rdoc Generator 2.