[R] error message when downloading packages using the OS X shell

David Winsemius dwinsemius at comcast.net
Tue Feb 16 06:11:32 CET 2010


On Feb 15, 2010, at 10:51 PM, Jessica Joganic wrote:

> I apologize for not including my entire script. What I typed into  
> the shell was:
>
> download.packages(ape)
>
> to which R responded with a Tcl/Tk interface allowing me to set my  
> CRAN. After I did so it proceeded to spit out the following error:
>
> Loading Tcl/Tk interface ... done*
> Error in file.info(x) : argument "destdir" is missing, with no default
>
> Let me know if that doesn't clarify my query. If this ends up being  
> a product of my preferring the terminal over the R.app then I'll  
> post to the Mac people and see what they have to say.
>
I don't think it ends up being an issue about preferring one interface  
over another, but in your not reading the error messages. It said it  
needed a destidir argument. Why not give it a sensible argument for  
destdir? From a Terminal session (and remembering that I got the same  
error message before as you were getting):

 > destdir <- .libPaths()[2]   # that is the system directory
 > download.packages(pkgs="ape", destdir=destdir)
--- Please select a CRAN mirror for use in this session ---
Loading Tcl/Tk interface ... done
trying URL 'http://lib.stat.cmu.edu/R/CRAN/bin/macosx/leopard/contrib/2.10/ape_2.5.tgz'
Content type 'application/x-gzip' length 1012381 bytes (988 Kb)
opened URL
==================================================
downloaded 988 Kb

      [,1]  [,2]
[1,] "ape" "/Library/Frameworks/R.framework/Resources/library/ 
ape_2.5.tgz"


Now I have a copy of the tgz file, but I think it still needs to be  
installed.

(You should also learn to post in plain text.)

-- 
David

> Jessica
>
>
> On Mon, Feb 15, 2010 at 9:06 PM, David Winsemius <dwinsemius at comcast.net 
> > wrote:
>
> On Feb 15, 2010, at 8:58 PM, Jessica Joganic wrote:
>
> Hi Fellow R Users,
> I recently upgraded to Mac OS X 10.5 (Snow Leopard) and had some  
> issues
> downloading and running R 2.10.1. I fixed the tcl/tk problem I was
> originally having but it was replaced with another. I run R out of  
> the shell
> (terminal) and when I ask it to download.packages() it gives me the
> following message:
>
> *Loading Tcl/Tk interface ... done*
> *Error in file.info(x) : argument "destdir" is missing, with no  
> default*
> *
> *
>
> I am a bit puzzled by that function call. I would have expected  
> there to be some arguments in the call. What were you expecting to  
> be the results?  After I run that function, I get a window of CRAN  
> sites to choose and after choosing the CMU site I get:
>
> > download.packages()
> --- Please select a CRAN mirror for use in this session ---
>
> Loading Tcl/Tk interface ... done
> Error in file.info(x) : argument "destdir" is missing, with no default
>
> I searched around on the help archives and various online message  
> boards and
> the most I could discern was that the directory where the library is  
> located
> isn't being recognized by R (it should recognize it by default). I  
> tried
> setting the "destdir" argument manually to no avail. I am able to
> successfully download and install packages with no problem if I run  
> the
> actual R program out of the Applications folder,
>
> Heh, the thing you are calling the "actual R program" is probably  
> the R-GUI, typically named R.app or R64.app, and it is a front-end  
> to the R executable.
>
>
> however I prefer to use the
> shell. I did find one mention of a recognized issue with OS X 10.5  
> and R
> 2.10.1 conflicting when trying to download packages, which results  
> in the
> library pathway being broken. The only problem is the fix for this  
> problem
>
> given in the R manual doesn't work. Has anyone had a similar problem  
> or have
> any ideas as to how to solve this?
>
> It happens for me as well, but I guess I don't see it as a problem,  
> since I did not offer a sensible set of arguments to the function.  
> (Plus, I always use the GUI despite Rolf Turner's efforts to shame  
> me into being a terminal dude.) You may want to post follow-ups to  
> the Mac-SIG mailing list where this would be amore appropriate  
> question:
>
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>
> -- 
>
> David Winsemius, MD
> Heritage Laboratories
> West Hartford, CT
>
>
>
>
> -- 
> Jessica L Joganic
> Graduate Student
> Department of Anthropology
> Campus Box 1114
> Washington University
> St. Louis, MO 63130-4899
> email: jljogani at artsci.wustl.edu

David Winsemius, MD
Heritage Laboratories
West Hartford, CT



More information about the R-help mailing list