简体   繁体   中英

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.

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.

Any workarounds?

The easiest way is to put the function file inside the deployr external folder and source it from there. 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)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM