Title: | Producing and Reproducing Results |
Version: | 2.2.14 |
License: | Apache License 2.0 |
Encoding: | UTF-8 |
URL: | https://www.opencpu.org https://opencpu.r-universe.dev/opencpu |
BugReports: | https://github.com/opencpu/opencpu/issues |
Depends: | R (≥ 3.0.0) |
Imports: | evaluate (≥ 0.12), httpuv (≥ 1.3), knitr (≥ 1.6), jsonlite (≥ 1.4), remotes (≥ 2.0.2), sys (≥ 2.1), webutils (≥ 0.6), curl (≥ 4.0), rappdirs, rlang, vctrs, methods, zip, mime, protolite, brew, openssl |
Suggests: | arrow, unix (≥ 1.5.3), haven, pander, R.rsp, svglite |
SystemRequirements: | pandoc, apparmor (optional) |
VignetteBuilder: | knitr, R.rsp |
Description: | A system for embedded scientific computing and reproducible research with R. The OpenCPU server exposes a simple but powerful HTTP api for RPC and data interchange with R. This provides a reliable and scalable foundation for statistical services or building R web applications. The OpenCPU server runs either as a single-user development server within the interactive R session, or as a multi-user Linux stack based on Apache2. The entire system is fully open source and permissively licensed. The OpenCPU website has detailed documentation and example apps. |
LazyData: | yes |
RoxygenNote: | 7.3.2.9000 |
NeedsCompilation: | no |
Packaged: | 2024-10-03 14:21:59 UTC; jeroen |
Author: | Jeroen Ooms |
Maintainer: | Jeroen Ooms <jeroenooms@gmail.com> |
Repository: | CRAN |
Date/Publication: | 2024-10-04 11:40:05 UTC |
OpenCPU Application
Description
Manage installed OpenCPU applications. These applications can be started locally using ocpu_start_app or deployed online on ocpu.io.
Usage
install_apps(repo, ...)
remove_apps(repo)
installed_apps()
available_apps()
update_apps(...)
Arguments
repo |
a github repository such as |
... |
additional options for |
Details
OpenCPU apps are simply R packages. For regular users, apps get installed in a user-specific app library which is persistent between R sessions. This is used for locally running or developing web applications.
When running these functions as opencpu
user on an OpenCPU cloud server, apps
will be installed in the global opencpu server app library; the same library as used
by the OpenCPU Github webhook.
See Also
Other ocpu:
ocpu-server
Examples
## Not run:
# List available demo apps
available_apps()
# Run application from: https://github.com/rwebapps/nabel
ocpu_start_app("rwebapps/nabel")
# Run application from: https://github.com/rwebapps/markdownapp
ocpu_start_app("rwebapps/markdownapp")
# Run application from: https://github.com/rwebapps/stockapp
ocpu_start_app("rwebapps/stockapp")
# Run application from: https://github.com/rwebapps/appdemo
ocpu_start_app("rwebapps/appdemo")
# Show currently installed apps
installed_apps()
## End(Not run)
OpenCPU Single-User Server
Description
Starts the OpenCPU single-user server for developing and running apps locally. To deploy your apps on a cloud server or ocpu.io, simply push them to github and install the opencpu webhook. Some example apps are available from github::rwebapps/.
Usage
ocpu_start_server(
port = 5656,
root = "/ocpu",
workers = 2,
preload = NULL,
on_startup = NULL,
no_cache = FALSE
)
ocpu_start_app(app, update = TRUE, ...)
Arguments
port |
port number |
root |
base of the URL where to host the OpenCPU API |
workers |
number of worker processes |
preload |
character vector of packages to preload in the workers. This speeds up requests to those packages. |
on_startup |
function to call once server has started (e.g. utils::browseURL) |
no_cache |
sets |
app |
either the name of a locally installed package, or a github remote (see install_apps) |
update |
checks if the app is up-to-date (if possible) before running |
... |
extra parameters passed to ocpu_start_server |
See Also
Other ocpu:
apps
Examples
## Not run:
# List available demo apps
available_apps()
# Run application from: https://github.com/rwebapps/nabel
ocpu_start_app("rwebapps/nabel")
# Run application from: https://github.com/rwebapps/markdownapp
ocpu_start_app("rwebapps/markdownapp")
# Run application from: https://github.com/rwebapps/stockapp
ocpu_start_app("rwebapps/stockapp")
# Run application from: https://github.com/rwebapps/appdemo
ocpu_start_app("rwebapps/appdemo")
# Show currently installed apps
installed_apps()
## End(Not run)