| 14947 |
duncan |
1 |
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
|
|
|
2 |
<html> <head>
|
|
|
3 |
<title>Testing the Embeddable R library</title>
|
|
|
4 |
<link rel=stylesheet href="../../doc/R.css">
|
|
|
5 |
</head>
|
|
|
6 |
|
|
|
7 |
<body>
|
|
|
8 |
<h1>Test the Embeddable R Library</h1>
|
|
|
9 |
|
|
|
10 |
This a collection of tests for verifying that using R as a library
|
|
|
11 |
within another application (i.e. embedded R) works for this
|
|
|
12 |
installation. This is only relevant if one has configured R with the
|
|
|
13 |
<code>--enable-R-shlib </code> argument for the top-level
|
|
|
14 |
<code>configure</code>. Currently, this only works for Unix,
|
| 25926 |
ripley |
15 |
and not Windows.
|
| 14947 |
duncan |
16 |
|
|
|
17 |
<p>
|
|
|
18 |
|
|
|
19 |
More information can be found at the
|
|
|
20 |
<a href="http://developer.r-project.org/embedded.html">R Developer's site</a>
|
|
|
21 |
|
|
|
22 |
<h3>Test Applications</h3>
|
|
|
23 |
<dl>
|
|
|
24 |
<dt>
|
|
|
25 |
<li> <a href="Rtest.c">Rtest</a>
|
|
|
26 |
<dd>
|
|
|
27 |
Just prints the vector <code>c(1, 2, ..., 10)</code>
|
|
|
28 |
<dt>
|
|
|
29 |
<li> <a href="Rplot.c">Rplot</a>
|
|
|
30 |
<dd> Creates a basic plot of <code>c(1,2,..., 10)</code>
|
|
|
31 |
in the default device and then quits immediately.
|
|
|
32 |
<dt>
|
|
|
33 |
<li> <a href="Rpostscript.c">Rpostscript</a>
|
|
|
34 |
<dd>
|
|
|
35 |
Produces a plot of <code>1:100</code> using the Postscript
|
|
|
36 |
graphics device. This creates a file named <code>Rplots.ps</code>
|
|
|
37 |
|
|
|
38 |
<dt>
|
|
|
39 |
<li><a href="Rerror.c"> Rerror</a>
|
|
|
40 |
<dd> Reads a function definition from an external file (<a
|
|
|
41 |
href="code.R"><code>code.R</code></a>) and calls it
|
|
|
42 |
which in turn generates an "error" via <code>stop()</code>.
|
|
|
43 |
The local error handler defined for this application
|
|
|
44 |
catches this error and recovers.
|
|
|
45 |
|
|
|
46 |
<dt>
|
|
|
47 |
<li> <a href="RNamedCall.c">RNamedCall</a>
|
|
|
48 |
<dd> Calls a function with some named arguments.
|
|
|
49 |
|
|
|
50 |
<dt>
|
|
|
51 |
<li> <a href="RParseEval.c">RParseEval</a>
|
|
|
52 |
<dd> Parses a string and evaluates the resulting expression(s).
|
|
|
53 |
|
|
|
54 |
|
|
|
55 |
<dt>
|
|
|
56 |
<li> <a href="Rpackage.c">Rpackage</a>
|
|
|
57 |
<dd> Invokes <code>example()</code>
|
|
|
58 |
for functions in ctest and mva
|
|
|
59 |
to ensure that packages can be loaded
|
|
|
60 |
into R in an embedded context. These
|
|
|
61 |
packages must be linked against libR.so.
|
|
|
62 |
|
|
|
63 |
<dt>
|
|
|
64 |
<li> <a href="embeddedRCall.c">embeddedRCall.c</a>
|
|
|
65 |
<dd> Collection of routines used in the different
|
|
|
66 |
tests.
|
|
|
67 |
<dt>
|
|
|
68 |
<li> Other Tests
|
|
|
69 |
<dd>
|
|
|
70 |
This has been tested in many other situations
|
|
|
71 |
including the some of the Omegahat packages:
|
|
|
72 |
<ul>
|
|
|
73 |
<li> As a procedural language within <a href="http://www.postgresql.org">Postsgres</a>.
|
|
|
74 |
See <a href="http://www.omegahat.org/DBMS/Postgres/R/RPostgres.pdf">R in Postgres</a>
|
|
|
75 |
<li> <a href="http://www.omegahat.org/RSJava">SJava</a>
|
|
|
76 |
<li> <a href="http://www.omegahat.org/SNetscape">SNetscape</a>
|
|
|
77 |
<li> <a href="http://www.omegahat.org/SXalan">SXalan</a>
|
|
|
78 |
<li> <a href="http://www.omegahat.org/SXalan">SXalan</a>
|
|
|
79 |
<li> <a href="http://www.omegahat.org/RSPython">RSPython</a>
|
|
|
80 |
<li> <a href="http://www.omegahat.org/RSPerl">RSPerl</a>
|
|
|
81 |
</ul>
|
|
|
82 |
These can be used as example code for embedding R within other applications.
|
|
|
83 |
</dl>
|
|
|
84 |
|
|
|
85 |
<hr>
|
|
|
86 |
<address></address>
|
|
|
87 |
<a href="http://cm.bell-labs.com/stat/duncan">Duncan Temple Lang</a>
|
|
|
88 |
<a href=mailto:duncan@research.bell-labs.com><duncan@research.bell-labs.com></a></address>
|
|
|
89 |
<!-- hhmts start -->
|
|
|
90 |
Last modified: Mon Jul 9 15:23:43 EDT 2001
|
|
|
91 |
<!-- hhmts end -->
|
|
|
92 |
</body> </html>
|