Are data objects persistent in openCPU's R session?

吃可爱长大的小学妹 提交于 2019-12-01 06:31:43

The OpenCPU API is stateless, there is no way to keep a process alive in between requests. But you can easily solve your problem by putting your dataset into a package, and installing that on the server.

You can use the preload option described in the server manual, or use the /etc/opencpu/Rprofile script to load the package with the dataset in memory when the server starts. That way the data will be will be ready to use when requests come in.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!