If you organize the files in a project as an installable package, then you can choose to export it as such. When another project imports this project, Domino will automatically install the package at runtime, making it available to your code.
-
Configure your project to export files.
-
From Code Package, select the language.
The following describes the language-specific pattern required for any package.
See the official manual for an in-depth guide to writing R extensions.
In summary, each R package requires:
-
A directory called
R/
with code files. -
A directory called
man/
with documentation files. -
A file named
DESCRIPTION
, with each line following the patternlink:key>: <value[]
. The required keys include:-
Package
-
Version (for example,
0.1
) -
Title
-
Description
-
Author
-
Maintainer (a name followed by an email address in angle brackets, for example,
Sample Maintainer <maintainer@example.com>
) -
License
-
-
A file named
NAMESPACE
that describes the namespace of the package. If you don’t know what to put here,exportPattern( "." )
works in many cases.