2

How do I access a specific object in an opencpu "session" in a subsequent function call?

Given a request, say to

/ocpu/library/base/R/eval

with parameter

 expr = "x <- 10; y <- 20"

Which gives

/ocpu/tmp/x08dfddafe3/R/.val
/ocpu/tmp/x08dfddafe3/R/x
/ocpu/tmp/x08dfddafe3/R/y
/ocpu/tmp/x08dfddafe3/stdout 
/ocpu/tmp/x08dfddafe3/source
/ocpu/tmp/x08dfddafe3/console
/ocpu/tmp/x08dfddafe3/info

Now .val has the value 20.

Suppose I wanted to pass x to

ocpu/library/stats/R/rnorm

Is there a quick way to that, something like

n = x08dfddafe3/R/x

in "pseudo"...

Stefan
  • 1,835
  • 13
  • 20

1 Answers1

3

Great question. Starting version 1.4.4 there are two ways of doing this:

Jeroen Ooms
  • 31,998
  • 35
  • 134
  • 207