You can create it to jumpstart your own algorithm for the vantage6 federated infrastructure.
You can use this repository as follows:
- Make sure the R package
devtools
is installed. - Fork this repository or download the files as ZIP archive
- Rename the folder containing the files to the name of your package. This is important, because the
Makefile
(located insrc/
) uses this folder name to infer your package name (and any docker images that follow from it). Alternatively, you can manually update theMakefile
. - Add functions you want users to access to the
src/R
directory (as you normally would for any package). - Add functions you want to run on a node as you normally would, but prefix their names with
RPC_
. - Build your package
- From RStudio: Menu -> Build -> Build All (or use the appropiate shortcut)
- From the command line: run
make
in the directory that contains theMakefile
.
- Once satisfied, dockerize and upload your package by running
make docker
(check theMakefile
for details). This requires you to be logged in to the docker (harbor) registry specified in the Makefile!
To make things easier for your users, you'll probably want to implement functions that run your federated functions. See src/R/hello.R
and src/R/RPC_hello.R
for examples.
The R
package derived from this template uses a Makefile
to build (see also https://www.r-bloggers.com/rstudio-and-makefiles-mind-your-options/). On Windows this might mean you have to install RTools, which includes make
(through Cygwin). Alternatively, have a look at Windows Subsystem for Linux (WSL).