首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >R- arules和arulesViz包中的错误

R- arules和arulesViz包中的错误
EN

Stack Overflow用户
提问于 2015-04-25 01:58:22
回答 1查看 3.4K关注 0票数 0

我正在使用R中的arulesarulesViz包在我的数据上实现一组关联规则。它工作得很好,直到几天前。但是现在,每当我加载使用这个包的R文件时,我都会得到下面的错误。

代码语言:javascript
复制
Loading required package: arules
Loading required package: Matrix
Attaching package: ‘arules’
The following objects are masked from ‘package:base’:
%in%, write
Error in length(obj) : Method length not implemented for class rules 
In addition: Warning message:
package ‘arules’ was built under R version 3.1.3 
Error in length(obj) : Method length not implemented for class rules 
Error in length(obj) : Method length not implemented for class rules 
Error in length(obj) : Method length not implemented for class rules

如果我在arulesViz中使用plot()函数,我会遇到以下错误:

代码语言:javascript
复制
Error in seq_along(x) : Method length not implemented for class rules

所以我试着卸载包并重新安装它。它只在重新安装后第一次工作,当我在重新安装后第一次使用时,它也抛出了下面的错误。

代码语言:javascript
复制
Loading required package: arules
Loading required package: Matrix

Attaching package: ‘arules’
The following objects are masked from ‘package:base’:
%in%, write

但是,一旦我保存了文件并将其加载回来,就会再次重复出现旧的错误消息。我在谷歌上搜索过,但没有任何人发布过这种类型的错误。非常感谢您的帮助。谢谢。

EN

回答 1

Stack Overflow用户

发布于 2015-05-14 09:18:22

FWIW我得到了同样的错误,这个SO页面是唯一出现的Google结果。这为我解决了这个问题(但我不知道为什么…)

代码语言:javascript
复制
> detach("package:arules", unload=TRUE)
> library("arules", lib.loc="[wherever your R libraries go]")
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/29854388

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档