Search code examples
roracle-databasearules

Compile R package "arulesSequence" for older release


I want to use arulessequences for sequence mining. I have to use it in Oracle R distribution version R 3.3.0 (last released) and The problem is that the last version of the arulesSequences package is R >= 3.3.2. So I get an error for this problem:

Error: this is R 3.3.0, package arulesSequences needs >=3.3.2

So I decided to compile the source code for older release. I downloaded an older package that needs R 3.2.5 or above. And I know that this package is depended to arules. so I have installed it already. I used following instructions to compile the arulessequences package: in the source directory I run this command:

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'

a file named 'arulesSequences_0.2-17.tar.gz' get created but when I check it as below I get the following as output:

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

I know the arules package is installed and I checked it. It seems the build process is not successful. do you have any idea to help solve this out?


Solution

  • You have to first install c/c++ compiler for R(called gcc) that is under R's additional build tools. to do that, in RStudio goto File->New File ->c++ File. It will show the following dialogue: enter image description here Then click on yes. to compile a package under windows, you have to set repo to Null and type to source. you can use this command to do that:

    install.packages("SOURCEADDRESS",type="source",repo=null)
    

    as @EugèneAdell mentioned above you have to first install arules. then arulessequences.