Description Usage Arguments Details Value Note Author(s) See Also Examples
Start background R worker processes on the local system.
1 2 3 4 5 |
n |
The number of workers to start. |
queue |
A (character) work queue name, or a list or character vector of queue names. |
host |
The Redis server host name or (character) I. P. address. |
port |
The Redis server port number. |
iter |
The maximum number of jobs to execute before exiting the worker loop (defaults to infinity). |
timeout |
The worker loop terminates if the work queue is deleted after the specified timeout interval. |
log |
Log messages to the specified destination (defaults to stderr()). |
Rbin |
The full path to the command-line R program. |
password |
The Redis server password. |
Use startLocalWorkers
to start one or more doRedis R worker processes
in the background. The worker processes are started on the local system using
the redisWorker
function.
Running workers self-terminate when their work queues are deleted with the
removeQueue
function.
Nothing is returned. Set the log
parameter to stdout()
to
see log messages printed on standard output of the invoking R session.
All doRedis functions require network access to a Redis server (not included with the doRedis package).
B. W. Lewis <blewis@illposed.net>
1 2 3 4 5 6 7 8 9 10 | ## Not run:
require('doRedis')
registerDoRedis('jobs')
startLocalWorkers(n=2, queue='jobs')
print(getDoParWorkers())
foreach(j=1:10,.combine=sum,.multicombine=TRUE) %dopar%
4*sum((runif(1000000)^2 + runif(1000000)^2)<1)/10000000
removeQueue('jobs')
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.