Skip to content

arules installation

7 messages · michael.weylandt at gmail.com (R. Michael Weylandt, Thomas Friedrichsmeier, R. Michael Weylandt +1 more

#
I sent the following and got the following reply to the R-Help, and then was told I should have sent it here.
On 07.12.2011 10:54, Thomas Chesney wrote:
Install an arules binary that was built for your version of R (reather 
than a later one) or install from sources.

Uwe Ligges
-------------------------------------

I tried installing from source as Prof Ligges suggested (as explained here: http://stackoverflow.com/questions/1474081/how-do-i-install-an-r-package-from-source) but got the following error:

install.packages("/Users/thomas/Documents/arules_1.0-7.tar.gz", repos=NULL, type="source")
* installing *source* package ?arules? ...
** libs
*** arch - i386
sh: make: command not found
ERROR: compilation failed for package ?arules?
* removing ?/Library/Frameworks/R.framework/Versions/2.13/Resources/library/arules?
Warning message:
In install.packages("/Users/thomas/Documents/arules_1.0-7.tar.gz",  :
  installation of package '/Users/thomas/Documents/arules_1.0-7.tar.gz' had non-zero exit status

Why would installing from source make any difference? Prof Ripley suggested I use arules for R.13.0, which I would if I could find it.

Has anyone got any advice?

Thank you,

Thomas
This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it.   Please do not use, copy or disclose the information contained in this message or in any attachment.  Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham.

This message has been checked for viruses but the contents of an attachment
may still contain software viruses which could damage your computer system:
you are advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.
You need a C compiler: the usual recommendation is XCode which you can get off your OS X install DVD or download from Apple Developer pages. 

Out of curiosity, how did you download the first time? I can still get 2.13.x packages from CRAN though I haven't tried with arules specifically. 

Michael
On Dec 7, 2011, at 6:05 AM, Thomas Chesney <Thomas.Chesney at nottingham.ac.uk> wrote:

            
#
Michael - thanks for the reply. So if I install my XCode C complier, then download the latest arules source file which is: arules_1.0-7.tar.gz and then run: install.packages("/Users/thomas/Documents/arules_1.0-7.tar.gz", repos=NULL, type="source") it will just work? (Why will that work with the latest version but the latest .tgz won't?)

What I usually do to install a package is download the .tgz file, double click to unzip it, then copy the resulting folder into Library/Frameworks/R.Framework/Resources/Library. I could install the latest R and then do that for arules, but then I'd have to do the same for dozens of other packages (or could I just copy them to another folder, update R, and then copy them to R.Framework/Resources/Library saying no to any replace file popups?)

Thomas
#
Theoretically, but I've always built packages from Terminal so I can't
promise it. Also, there's an outside chance you'll need a Fortran
compiler too, but I haven't looked at the source files to confirm.

I'd also suggest you try your CRAN mirror one more time and make sure
you are getting the 2.13 version: for instance, I used this link:

http://lib.stat.cmu.edu/R/CRAN/bin/macosx/leopard/contrib/2.13/arules_1.0-7.tgz'

I believe that the link shown on the CRAN page will automatically give
you the current release (2.14) build.

Michael

2011/12/7 Thomas Chesney <Thomas.Chesney at nottingham.ac.uk>:
#
On Dec 7, 2011, at 4:35 PM, R. Michael Weylandt wrote:

            
You would want all of the Xcode to be installed including the Fortran  
complier and other support.
It should succeed that way if Xocde is properly installed. Why didn't  
you try that?

AND: Why are you staying with 2.13? Why not update your R version?
That is only going to work for  packages that are all-R and no C/Fortran
The usual recommendation is after updating R , which creates a new  
Resources folder with ./library/, to copy/paste the contents of the  
2.13 ../library/ into the new one and then at the R console to execute:

update.packages(checkBuilt=TRUE) # and probably also include the  
ask=FALSE option

I usually forget that ask option and then have to keep typing Y<cr>.

Best;
David.
David Winsemius, MD
West Hartford, CT
#
Hey it worked! Thank you *very* much. I installed XCode from my Mac DVD, then downloaded the arules source file and ran R CMD INSTALL /Users/thomas/Documents/arules_1.0-7.tar.gz in the terminal.

So should I always use the source file of the pakages in the future? How come this worked but downloading the binary didn't? The binary file is somehow tied to a version of R whereas the source file isn't? Has the binary file been complied already whereas my CMD INSTALL command compiled C code on my machine? But then why would my compiled C code be different from the compiled C code in the binary file?

Anyway, important thing is it seems to have worked, but if someone could advise on whether I should use source files in the future that would be really helpful.

Thomas
#
On Dec 8, 2011, at 5:16 AM, Thomas Chesney wrote:

            
I wouldn't. I used to do so but the system is very stable in my  
experience over the last several years. Unless you enjoy the thrill of  
seeing pages of compiler messages scrolling across you screen,  (and I  
will admit to sometimes being strangely thrilled by that experience at  
times) there isn't much point.
To some extent that may be true. Major version upgrades to R sometimes  
add requirements on packages or provide new functions. Source code  
from former years may also fail to compile with newer versions of R.
Yes. Mac binaries are *.tgz files whereas *.tar.gz files are source.  
Source files may or may not require compilation of C/Fortran code. Not  
all packages have such. Some packages are pure R and installation  
would succeed even without the Xcode resources.
Not sure what you mean here. Are you asking about some specific  
instance?