[R-SIG-Mac] problem with options("pkgType") in a home-built R 2.2.0

Don MacQueen macq at llnl.gov
Sat Oct 15 00:18:53 CEST 2005


David,

Stefan has already answered.  None the less, here's my perspective.

Like you, I build from source, and have also discovered the change in 
default 'type' for
install.packages() and friends. Like you, I left the default 
--with-aqua unchanged.

Here's a relevant excerpt from the NEWS file.

   o	There is now support of installing from within R both source and
	binary packages on MacOS X and Windows.	 Most of the R
	functions now have a 'type' argument defaulting to
	getOption("pkgType") and with possible values "source",
	"win.binary" and "mac.binary".	The default is "source" except
	under Windows and the CRAN GUI build for MacOS X.

I would think that the configure option --with-aqua causes a build to 
be a "CRAN GUI" build, because
--with-aqua is what gets you the option of using the double-clickable 
app that goes in your /Applications folder.

I decided to live with having to set type to 'source' each time I use 
it; it's not that much of an extra burden. I'd suggest building 
without aqua and finding out if that sets the default back to 
'source'.

I build from source on my primary machine because I also am also the 
local installer for R on Solaris, and I find it easier when things 
are similar on both platforms. I normally send other users to the 
Aqua version, and for them the default of 'mac.binary' makes sense.

-Don

At 10:32 PM +0100 10/14/05, David Firth wrote:
>I have built R 2.2.0 from source, on Mac OS X 10.4, with the 
>configure step as follows:
>
>./configure --with-x --with-tcltk F77=gfortran --with-blas="-
>framework vecLib" --with-lapack
>
>(yes, I know some of that is redundant now!)
>
>Al goes fine with the build.  But when I run R I find
>
>  > version
>           _
>platform powerpc-apple-darwin8.2.0
>arch     powerpc
>os       darwin8.2.0
>system   powerpc, darwin8.2.0
>status
>major    2
>minor    2.0
>year     2005
>month    10
>day      06
>svn rev  35749
>language R
>  > options("pkgType")
>$pkgType
>[1] "mac.binary"
>  > contrib.url(options("repos"))
>                                                           CRAN
>"http://cran.uk.r-project.org/bin/macosx/powerpc/contrib/2.2"
>
>This creates problems for me when I try to use for example 
>install.packages:
>
>1.  If I try to run install.packages, the URL that gets used does not 
>exist (as I also verified outside of R):
>  > install.packages("eha")
>Warning in install.packages("eha") : argument 'lib' is missing: 
>using /Users/david/Library/R
>Warning: unable to access index for repository http://cran.uk.r-
>project.org/bin/macosx/powerpc/contrib/2.2
>Warning in download.packages(pkgs, destdir = tmpd, available = 
>available,  :
>           no package 'eha' at the repositories
>
>2.  My reading of ?options is that options("pkgType") for me should 
>be "source" not "mac.binary", since it says
>       'pkgType': The default type of packages to be downloaded and
>            installed - see 'install.packages'. Possible values are
>            '"source"' (the default except under the CRAN Mac OS X build)
>            and '"mac.binary"'.
>I do not think I am running "the CRAN Mac OS X build" -- I have never 
>downloaded the R binary from CRAN, and I assume (correctly?) that 
>that is what is meant there.  If I do options(pkgType = "source") all 
>is fine.  But should I have to do that myself?
>
>This behaviour seems to be new to R 2.2.0.  Have I blundered 
>somewhere in building R?  I noticed that --with-aqua is now a default 
>configure option, but I didn't negate that because (a) I wasn't sure 
>what it does [what does it do?], and (b) I supposed it was the 
>default for good reason.
>
>I got the same behaviour when building under Mac OS 10.3.9, with
>./configure --with-x --with-tcltk --with-tcl-config=/sw/lib/
>tclConfig.sh --with-tk-config=/sw/lib/tkConfig.sh  --with-blas="-
>framework vecLib" --with-lapack
>
>I would welcome any advice.  I build R myself mainly because I like 
>to use ESS as my interface.
>
>Yours hopefully,
>David
>
>_______________________________________________
>R-SIG-Mac mailing list
>R-SIG-Mac at stat.math.ethz.ch
>https://stat.ethz.ch/mailman/listinfo/r-sig-mac


-- 
--------------------------------------
Don MacQueen
Environmental Protection Department
Lawrence Livermore National Laboratory
Livermore, CA, USA



More information about the R-SIG-Mac mailing list