为旧版本编译 R 包 "arulesSequence"
Compile R package "arulesSequence" for older release
我想使用arulessequences进行序列挖掘。我必须在 Oracle R 分发版本 R 3.3.0(最新发布)中使用它,问题是 arulesSequences 包的最新版本是 R >= 3.3.2。所以我得到这个问题的错误:
Error: this is R 3.3.0, package arulesSequences needs >=3.3.2
所以我决定编译旧版本的源代码。我下载了一个需要 R 3.2.5 或更高版本的旧包。而且我知道这个包取决于规则。所以我已经安装了它。我使用以下说明来编译 arulessequences 包:
在源目录中我 运行 这个命令:
R CMD build arulesSequences
the output of this command is:
c:\rr\arulesSequences_0.2-17>R CMD build arulesSequences
* checking for file 'arulesSequences/DESCRIPTION' ... OK
* preparing 'arulesSequences':
* checking DESCRIPTION meta-information ... OK
* cleaning src Warning in cleanup_pkg(pkgdir, Log) : unable to run 'make clean' in 'src'
* checking for LF line-endings in source and make files
* checking for empty or unneeded directories
* looking to see if a 'data/datalist' file should be added
* building 'arulesSequences_0.2-17.tar.gz'
创建了一个名为 'arulesSequences_0.2-17.tar.gz' 的文件,但是当我如下检查它时,我得到以下输出:
c:\rr\arulesSequences_0.2-17\arulesSequences>R CMD check arulesSequences
* using log directory 'c:/rr/arulesSequences_0.2-17/arulesSequences/arulesSequences.Rcheck'
- using R version 3.4.0 (2017-04-21)
- using platform: x86_64-w64-mingw32 (64-bit)
- using session charset: ISO8859-1
- checking for file 'arulesSequences/DESCRIPTION' ... OK
- this is package 'arulesSequences' version '0.2-17'
- checking package namespace information ... OK
- checking package dependencies ... ERROR Package required but not available: 'arules'
See section 'The DESCRIPTION file' in the 'Writing R Extensions'
manual.
* DONE Status: 1 ERROR
我知道安装了arules包,我检查了它。似乎构建过程不成功。你有什么想法可以帮助解决这个问题吗?
不是构建,而是获取似乎适合您的 R 版本的存档包并安装它们。在我的 Linux 上,这给出了:
wget http://cran.univ-paris1.fr/src/contrib/Archive/arules/arules_1.5-0.tar.gz
R CMD INSTALL $HOME/arules_1.5-0.tar.gz
* installing to library ‘/home/ruser/R-3.2.5/lib64/R/library’
* installing *source* package ‘arules’ ...
...
** testing if installed package can be loaded
* DONE (arules)
wget http://cran.univ-paris1.fr/src/contrib/Archive/arulesSequences/arulesSequences_0.2-17.tar.gz
R CMD INSTALL $HOME/arulesSequences_0.2-17.tar.gz
* installing to library ‘/home/ruser/R-3.2.5/lib64/R/library’
* installing *source* package ‘arulesSequences’ ...
...
** testing if installed package can be loaded
* DONE (arulesSequences)
R
> library(arulesSequences)
Loading required package: arules
Loading required package: Matrix
Attaching package: ‘arules’
也许更新版本的 arules 是可能的,我刚从 1.5 系列中拿了第一个。
您必须先安装 c/c++ R 编译器(称为 gcc),该编译器位于 R 的附加构建工具下。
为此,在 RStudio 中转到 File->New File ->c++ File。
它将显示以下对话:
然后点击是。
要在 windows 下编译一个包,您必须将 repo 设置为 Null 并键入 source。
你可以使用这个命令来做到这一点:
install.packages("SOURCEADDRESS",type="source",repo=null)
正如上面提到的@EugèneAdell,您必须先安装arules。然后 arulessequences.
我想使用arulessequences进行序列挖掘。我必须在 Oracle R 分发版本 R 3.3.0(最新发布)中使用它,问题是 arulesSequences 包的最新版本是 R >= 3.3.2。所以我得到这个问题的错误:
Error: this is R 3.3.0, package arulesSequences needs >=3.3.2
所以我决定编译旧版本的源代码。我下载了一个需要 R 3.2.5 或更高版本的旧包。而且我知道这个包取决于规则。所以我已经安装了它。我使用以下说明来编译 arulessequences 包: 在源目录中我 运行 这个命令:
R CMD build arulesSequences the output of this command is:
c:\rr\arulesSequences_0.2-17>R CMD build arulesSequences
* checking for file 'arulesSequences/DESCRIPTION' ... OK
* preparing 'arulesSequences':
* checking DESCRIPTION meta-information ... OK
* cleaning src Warning in cleanup_pkg(pkgdir, Log) : unable to run 'make clean' in 'src'
* checking for LF line-endings in source and make files
* checking for empty or unneeded directories
* looking to see if a 'data/datalist' file should be added
* building 'arulesSequences_0.2-17.tar.gz'
创建了一个名为 'arulesSequences_0.2-17.tar.gz' 的文件,但是当我如下检查它时,我得到以下输出:
c:\rr\arulesSequences_0.2-17\arulesSequences>R CMD check arulesSequences
* using log directory 'c:/rr/arulesSequences_0.2-17/arulesSequences/arulesSequences.Rcheck'
- using R version 3.4.0 (2017-04-21)
- using platform: x86_64-w64-mingw32 (64-bit)
- using session charset: ISO8859-1
- checking for file 'arulesSequences/DESCRIPTION' ... OK
- this is package 'arulesSequences' version '0.2-17'
- checking package namespace information ... OK
- checking package dependencies ... ERROR Package required but not available: 'arules'
See section 'The DESCRIPTION file' in the 'Writing R Extensions'
manual.
* DONE Status: 1 ERROR
我知道安装了arules包,我检查了它。似乎构建过程不成功。你有什么想法可以帮助解决这个问题吗?
不是构建,而是获取似乎适合您的 R 版本的存档包并安装它们。在我的 Linux 上,这给出了:
wget http://cran.univ-paris1.fr/src/contrib/Archive/arules/arules_1.5-0.tar.gz
R CMD INSTALL $HOME/arules_1.5-0.tar.gz
* installing to library ‘/home/ruser/R-3.2.5/lib64/R/library’
* installing *source* package ‘arules’ ...
...
** testing if installed package can be loaded
* DONE (arules)
wget http://cran.univ-paris1.fr/src/contrib/Archive/arulesSequences/arulesSequences_0.2-17.tar.gz
R CMD INSTALL $HOME/arulesSequences_0.2-17.tar.gz
* installing to library ‘/home/ruser/R-3.2.5/lib64/R/library’
* installing *source* package ‘arulesSequences’ ...
...
** testing if installed package can be loaded
* DONE (arulesSequences)
R
> library(arulesSequences)
Loading required package: arules
Loading required package: Matrix
Attaching package: ‘arules’
也许更新版本的 arules 是可能的,我刚从 1.5 系列中拿了第一个。
您必须先安装 c/c++ R 编译器(称为 gcc),该编译器位于 R 的附加构建工具下。
为此,在 RStudio 中转到 File->New File ->c++ File。
它将显示以下对话:
install.packages("SOURCEADDRESS",type="source",repo=null)
正如上面提到的@EugèneAdell,您必须先安装arules。然后 arulessequences.