« The biggest R stories from 2016 | Main | Analyzing emotions in video with R »

January 04, 2017


Feed You can follow this conversation by subscribing to the comment feed for this post.

Hello Sean,

Thanks for the article describing the new mrsdeploy package. In our organization, we have developed an application using MRS 8.0 and we used deployR for our application integration.

One of the function that we used was interruptExecution() which we used to interrupt a running R process and rerun with different arguments. Is this functionality removed or does the pause or resume helps with this?

Currently I am trying with MRS 9.0 and swagger API and will comment with few more things I find.

Anish Sharma

Hello Anish,

Thanks for the query.

1. Is this functionality removed

No. MRS 9.0.x still has the ability to "interrupt" using the core-server APIS, please see cancelSession I believe it is comparable to MRS 8.x while you use it in conjunction with executeCode

One caveat is that the user defined web services, (e.g.) the APIs that are consumable via (POST /api/:name/:version) currently do not have an "interrupt" feature. So it you published a service in R with `mrsdeploy` as defined below, there is currently no way to interrupt:


longRunning <- function() { ..... }

api <- publishService('forever', code = longRunning)

# no way to interrupt


I think this in fine because will shortly have batch execution and async-execution inside `mrsdeploy` come March of this year. These are more suitable for long running scripts. Currently they exist in the core-server APIS just not the R package.

2. Does the pause or resume helps with this

No. The `pause()` and `resume()` functions are only part of the `mrsdeploy` R package. Their intention is to do a "context swtich" from your remote command line interaction and your local R IDE command line.

For example:


This prompt indicates I am currently interacting with a remote R session in
MRS 9.0.x. All objects defined via this `REMOTE>` prompt are part of the remote
R session and not part your local R workspace in your R IDE.

`REMOTE> pause()`

This function does a "context switch" from your remote R session command line,
still keeping it active and returns interaction control back to your local
command line.

`> resume()`

The `resume` function does the opposite. It performs a "context switch" from your
local command line and its workspace/R-session [back] to the remote R workspace/R-session.

A summarized workflow example:

REMOTE> # I am remote
REMOTE> pause()
> # I am now local
> resume()
REMOTE> # I am not remote again
REMOTE> exit
> # I am now local again and logged out and the remote R-session in closed

Please reach out with more questions/comments/suggestions. We are currently
pushing out more end-to-end examples.

The comments to this entry are closed.

Search Revolutions Blog

Got comments or suggestions for the blog editor?
Email David Smith.
Follow revodavid on Twitter Follow David on Twitter: @revodavid
Get this blog via email with Blogtrottr