在 R 集群中包含进度条
Including progress bar in R cluster
我在 R raster 库中使用 cluster 来加快对 sdm 进行 运行 预测时的处理时间楷模。然而,即使使用了所有可用内核 (35),也需要很长时间。是否可以合并一个进度条以便我可以查看它的进度?当我在没有cluster的情况下使用predict时,我可以显示进度;
pb <- predict(pred_nf, bc, ext=ext, progress='text')
但是,当我将它包含在集群中时,它并没有出现
beginCluster()
pb <- clusterR(pred_nf, predict, args=list(bc, ext=ext, progress='text'))
endCluster()
有人对此有解决方案吗?
我认为您需要将进度条代码放在右括号之外。
试试这个:
# create a cluster and ID the # of cores to use
beginCluster(3)
#predict fxn using clusterR
r.prob.Cluster<-clusterR(logo, predict, args=list(model.RF),
progress='text', type='prob')
endCluster() #delete the cluster
我在 R raster 库中使用 cluster 来加快对 sdm 进行 运行 预测时的处理时间楷模。然而,即使使用了所有可用内核 (35),也需要很长时间。是否可以合并一个进度条以便我可以查看它的进度?当我在没有cluster的情况下使用predict时,我可以显示进度;
pb <- predict(pred_nf, bc, ext=ext, progress='text')
但是,当我将它包含在集群中时,它并没有出现
beginCluster()
pb <- clusterR(pred_nf, predict, args=list(bc, ext=ext, progress='text'))
endCluster()
有人对此有解决方案吗?
我认为您需要将进度条代码放在右括号之外。
试试这个:
# create a cluster and ID the # of cores to use
beginCluster(3)
#predict fxn using clusterR
r.prob.Cluster<-clusterR(logo, predict, args=list(model.RF),
progress='text', type='prob')
endCluster() #delete the cluster