r - 如何将 ff 对象传递给集群/节点
问题描述
我有我的数据作为 ff 数组并完美地存储在磁盘上,我正在尝试使用并行计算。数组的名称存储在数据框 DATA.wind 的 Smoothed_name 列中
DATA.wind<-subset(DATA,DATA$variable=="u"|DATA$variable=="v")
# Calculate the number of cores
no_cores <- detectCores() - 1
cl <- makeCluster(no_cores)
#Exporting functions and environment to cluster
clusterExport(cl, list("five_points_smoother","DATA.wind"),envir=globalenv())
parLapply(cl,
1:length(DATA.wind$No),function(x){
medium1<-five_points_smoother(get(DATA.wind$var_name[x]))
assign(DATA.wind$Smoothed_name[x],ff(medium1,dim =dim(medium1)))
})
当我运行 parLapply 时,我收到此错误:
` Error in checkForRemoteErrors(val) :
one node produced an error: object 'u_1088632800' not found `
知道'u_1088632800'是存储在df中的数组名称之一。
解决方案
推荐阅读
- android - 如何将接收图像的线程与 url 同步
- c# - 将 EF Core InMemory 数据库序列化为 JSON
- c# - 调试 Web API 返回资源不匹配错误
- c# - 在循环遍历所有 DataGrid ItemSource 期间获取行索引
- php - 使用 Codeigniter2.2.6 为每个 html 表单自动生成发票计费序列号
- javascript - 在具有 Z 索引的子分层 div 上触发 Onclick,指针事件不起作用
- clojure - Clojure 中的算术表达式简化器
- python-3.x - 用 Discord.PY 提及用户和自我
- javascript - 如何使用 JavaScript 检查元素文本节点是否在视觉上都是空的?
- c++ - 如何使用 C/C++ 在 linux 上操作应用程序窗口