[英]R: DeployR access functions from another file
I am executing a R script within DeployR but currently all my function definitions etc. lie inside this same file which then becomes huge. 我正在DeployR中执行R脚本,但是当前我所有的函数定义等都位于同一文件内,该文件随后变得很大。
Is there a way to split the definitions into another file? 有没有办法将定义拆分到另一个文件? Right now if I paste them into another file and save that file in the same dir in the Online DeployR Repository the original file cannot seem to see them.
现在,如果我将它们粘贴到另一个文件中,然后将该文件保存在Online DeployR存储库中的同一目录中,则原始文件似乎看不到它们。
Any workarounds? 任何解决方法?
The easiest way is to put the function file inside the deployr external
folder and source it from there. 最简单的方法是将功能文件放在部署程序的
external
文件夹中,然后从那里获取源文件。 See https://deployr.revolutionanalytics.com/documents/dev/scientist-portable-code/#fileaccessport for an example (the example is reading a csv file but the idea is the same) 有关示例,请参见https://deployr.revolutionanalytics.com/documents/dev/scientist-portable-code/#fileaccessport (示例读取的是csv文件,但想法是相同的)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.