blob: 2351f42aa4a401fd55064baba80892a8fc1e8ddb [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Testing the Embeddable R library</title>
<link rel=stylesheet href="../../doc/html/R.css" />
</head>
<body>
<h1>Test the Embeddable R Library</h1>
<p>
This a collection of tests for verifying that using R as a library
within another application (i.e. embedded R) works for this
installation. This is only relevant if one has configured R with the
<code>--enable-R-shlib </code> argument for the top-level
<code>configure</code>.
</p>
<p>
More information can be found at the
<a href="https://developer.r-project.org/embedded.html">R Developers' site</a>
</p>
<h3>Test Applications</h3>
<dl>
<dt>
<a href="Rtest.c">Rtest</a>
</dt>
<dd>
Just prints the vector <code>c(1, 2, ..., 10)</code>
</dd>
<dt>
<a href="Rplot.c">Rplot</a>
</dt>
<dd>
Creates a basic plot of <code>c(1,2,..., 10)</code>
in the default device and then quits immediately.
</dd>
<dt>
<a href="Rpostscript.c">Rpostscript</a>
</dt>
<dd>
Produces a plot of <code>1:100</code> using the Postscript
graphics device. This creates a file named <code>Rplots.ps</code>
</dd>
<dt>
<a href="Rerror.c"> Rerror</a>
</dt>
<dd>
Reads a function definition from an external file
(<a href="code.R"><code>code.R</code></a>) and calls it
which in turn generates an "error" via <code>stop()</code>.
The local error handler defined for this application
catches this error and recovers.
</dd>
<dt>
<a href="RNamedCall.c">RNamedCall</a>
</dt>
<dd>
Calls a function with some named arguments.
</dd>
<dt>
<a href="RParseEval.c">RParseEval</a>
</dt>
<dd>
Parses a string and evaluates the resulting expression(s).
</dd>
<dt>
<a href="Rpackage.c">Rpackage</a>
</dt>
<dd>
Invokes <code>example()</code> for functions in ctest and mva
to ensure that packages can be loaded into R in an embedded
context. These packages must be linked against libR.so.
</dd>
<dt>
<a href="embeddedRCall.c">embeddedRCall.c</a>
</dt>
<dd>
Collection of routines used in the different tests.
</dd>
<dt>
Other Tests
</dt>
<dd>
This has been tested in many other situations including the some of
the former Omegahat packages:
<ul>
<li>
As a procedural language within <a href="https://www.postgresql.org">Postsgres</a>.
See <a href="https://www.omegahat.net/DBMS/Postgres/R/RPostgres.pdf">R
in Postgres</a>
</li>
<li>
<a href="https://www.omegahat.net/RSJava">SJava</a>
</li>
<li>
<a href="https://www.omegahat.net/SNetscape">SNetscape</a>
</li>
<li>
<a href="https://www.omegahat.net/SXalan">SXalan</a>
</li>
<li>
<a href="https://www.omegahat.net/RSPython">RSPython</a>
<li>
<a href="https://www.omegahat.net/SXalan">SXalan</a>
</li>
<li>
<a href="https://www.omegahat.net/RSPerl">RSPerl</a>
</li>
</ul>
These can be used as example code for embedding R within other
applications.
</dd>
</dl>
<hr/>
</body>
</html>