简体   繁体   English

将R软件包运送到SparkR中的节点

[英]Shipping R packages to the nodes in SparkR

嗨,我想知道是否存在一种解决方案,可以通过spark-submit运送R软件包并在SparkR的计算节点上使用它们?

Zip the contents of the R package and ship it as my_package.zip to the cluster, ie with the spark-submit command. 压缩R软件包的内容,并将其作为my_package.zip运送到集群,即使用spark-submit命令。 This will place the zip file into the working directory of the SparkR script. 这会将zip文件放入SparkR脚本的工作目录中。

Then you can install the package within your R script: 然后,您可以在R脚本中安装该软件包:

 install.packages("my_package.zip",repos=NULL)
 library(my_package)

DISCLAIMER: If your package depends on other packages, you will need to ship and install them manually. 免责声明:如果您的软件包依赖于其他软件包,则需要手动运送和安装它们。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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