s2c: Server-to-Client Object Transfer

Description Usage Arguments Details Value Examples

Description

This function allows you to pass an object from the server to the local R session behind the client.

Usage

1
s2c(object, newname, env = .GlobalEnv)

Arguments

object

A remote R object.

newname

The name the object should take when it is stored on the local client's R session. Must be the form of a character string. If left blank, the local name will be the same as the original (remote) object's name.

env

The environment into which the assignment will take place. The default is the global environment.

Details

Localize R objects.

A newname, if specified, must be passed as a string (not a literal; i.e., "mynewname", not mynewname). The name must also be syntactically valid (see ?make.names).

Value

Returns TRUE invisibly on successful exit.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## Not run: 
### Prompts are listed to clarify when something is eval'd locally vs remotely
> library(remoter)
> y
###  Error: object 'y' not found
> remoter::connect("my.remote.server")
remoter> x
### Error: object 'x' not found
remoter> x <- "some data"
remoter> x
###  [1] "some data" 
remoter> s2c(x, "y")
remoter> q()
> y
###  [1] "some data"

## End(Not run)

remoter documentation built on May 2, 2019, 6:12 a.m.