Implementing algorithms and fitting models when sites (possibly remote) share computation summaries rather than actual data over HTTP with a master R process (using 'opencpu', for example). A stratified Cox model and a singular value decomposition are provided. The former makes direct use of code from the R 'survival' package. (That is, the underlying Cox model code is derived from that in the R 'survival' package.) Sites may provide data via several means: CSV files, Redcap API, etc. An extensible design allows for new methods to be added in the future and includes facilities for local prototyping and testing. Web applications are provided (via 'shiny') for the implemented methods to help in designing and deploying the computations.
This package is described in detail in the paper Software for Distributed Computation on Medical Databases: A Demonstration Project.
Install this package the usual way in R or via:
library(devtools)
install_github("bnaras/distcomp")
Then, you will find a document that describes several examples installed under the R library tree. For example:
list.files(system.file("doc", package = "distcomp"))
list.files(system.file("doc_src", package = "distcomp"))
The examples described in the reference below are available as follows:
list.files(system.file("ex", package = "distcomp"))
Use of this package requires some configuration. In particular, to run
the examples on a local machine where a single opencpu server will be
emulating several sites, a suitable R profile needs to be set up. That
profile will be something along the lines of
library(distcomp)
distcompSetup(workspace = "full_path_to_workspace_directory",
ssl_verifyhost = 0L, ssl_verifypeer = 0L)
where the workspace is a directory that the opencpu server can
serialize objects to. On Unix or Mac, the above can be inserted into an
.Rprofile file, but on Windows, we find that the Rprofile.site file
needs to contain the above lines.
The effect of this is that every R process (including the opencpu
process) has access to the distcomp library and the workspace.
Refer to the vignette in the package for some tips on developing new distributed computations.
Balasubramanian Narasimhan and Daniel Rubin and Samuel Gross and Marina Bendersky and Philip Lavori. Software for Distributed Computation on Medical Databases: A Demonstration Project. Journal of Statistical Software, Volume 77, Issue 13, (2017). DOI