Debian Codegraph @

inst/examples/README

raw
1 # Instructions
2
3 Before proceeding with the examples contained in this subdirectory,
4 please read all of the following carefully. Failure to do so may
5 lead to confusion.
6
7
8 ## Naming Conventions
9
10 Examples are given in the variety of interfaces avaialable in pbdZMQ.
11 The naming convention goes:
12
13 1. No preface is placed on the file name for the basic interface.
14 2. pyzmq_ prefaces the file name if the example uses the PyZMQ-like R6
15 interface (see help("pyzmq") for details).
16 3. rzmq_ prefaces the file name if the example uses the rzmq-like
17 interface (see help("rzmq") for details).
18
19
20 ## Running An Example
21
22 Each of these examples should be executed in the following way:
23
24 1. Start the server by running server.r IN BATCH. You can do this by
25 executing `Rscript server.r` from a terminal.
26 2. Start the client by sourcing client.r INTERACTIVELY. You can do this
27 by starting an R session (Rstudio, wingui, R.app, ...) and running
28 `source client.r`.
29 3. Pass commands from client to server by executing
30 `sendrecv(socket, "1+1")` from the client (replace "1+1" with the
31 command of your choice, as a string).
32 4. Shut down the server by executing `sendrecv(socket, "EXIT")` on
33 the client.
34
35 See the package vignette for more details.