在Mac上的R 3.0.1中,tm_map具有parallel :: mclapply错误 [英] tm_map has parallel::mclapply error in R 3.0.1 on Mac

查看:294
本文介绍了在Mac上的R 3.0.1中,tm_map具有parallel :: mclapply错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在平台上使用R 3.0.1:x86_64-apple-darwin10.8.0(64位)

I am using R 3.0.1 on Platform: x86_64-apple-darwin10.8.0 (64-bit)

我正在尝试使用tm库中的tm_map.但是当我执行这段代码

I am trying to use tm_map from the tm library. But when I execute the this code

library(tm)
data('crude')
tm_map(crude, stemDocument)

我收到此错误:

Warning message:
In parallel::mclapply(x, FUN, ...) :
  all scheduled cores encountered errors in user code

有人知道解决方案吗?

推荐答案

我怀疑您没有安装SnowballC软件包,这似乎是必需的. tm_map应该使用mclapply在所有文档上运行stemDocument.尝试仅在一个文档上运行stemDocument函数,这样就可以提取错误:

I suspect you don't have the SnowballC package installed, which seems to be required. tm_map is supposed to run stemDocument on all the documents using mclapply. Try just running the stemDocument function on one document, so you can extract the error:

stemDocument(crude[[1]])

对我来说,我遇到了一个错误:

For me, I got an error:

Error in loadNamespace(name) : there is no package called ‘SnowballC’

所以我就继续安装SnowballC,它就可以了.显然,SnowballC应该是依赖项.

So I just went ahead and installed SnowballC and it worked. Clearly, SnowballC should be a dependency.

这篇关于在Mac上的R 3.0.1中,tm_map具有parallel :: mclapply错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆