On Wed, May 25, 2011 at 15:23, Simon Urbanek <simon.urbanek@r-project.org>wrote:

>
> On May 25, 2011, at 7:17 AM, Tom Hopper wrote:
>
> > On Wed, May 25, 2011 at 11:50, Prof Brian Ripley <ripley@stats.ox.ac.uk
> >wrote:
> >
> >> On Wed, 25 May 2011, Tom Hopper wrote:
> >>
> >> Brian,
> >>>
> >>> Since the problem was fixed by updating packages with checkBuilt=T,
> >>> wouldn't
> >>> installing packages fresh using the script have avoided the problem?
> >>>
> >>
> >> No, because it checks if they are already installed *as I said*.
> >
> >
> > Sorry, my question was poorly structured. I understood your original
> > statement, and was following up with regards to the update process of R
> for
> > Mac and some of its inner workings. Since I don't have your knowledge of
> the
> > software, and am unlikely to develop such knowledge in the foreseeable
> > future, I (perhaps incorrectly) addressed my question to you.
> >
> > I take it from your response that the problem that Ian Reeve encountered
> is
> > due to an unresolved bug in R and that there was nothing that could have
> > been done to get the packages to correctly install when moving from 2.12
> to
> > 2.13.0, short of including checkBuilt=T.
> >
>
> No, you got it completely backwards! The script you referred to is useless
> in that case (and I told you that you are entirely off topic with that!), it
> has nothing to do with R. There is no "bug" in R mentioned anywhere in the
> thread, so you are really inventing things here. Please *do* read the
> e-mails you are receiving.
>

Ignoring the personal attack, I'd like to get back to the thread, and my
question.

Having read through the thread a couple of times, my understanding is that
Ian Reeve updated R for Mac using the installer, then installed all of the
packages he wanted from CRAN. As I understand the thread, after this update,
an old package compiled under 2.12 was, inexplicably, located in his 2.13
library. That it was a package problem and not something else was confirmed
by resolving the problem with update.packages(checkBuilt=T), rather than the
other methods suggested. It seems to me that either the R installer did not
update correctly, perhaps by retaining a link to the 2.12 directory, or Ian
accidentally copied a package over rather than reinstalling everything fresh
from CRAN. I believe that you, Simon, suggested the latter as a possibility.
I refer to the former possibility as a "bug," because, to the best of my
knowledge, it should happen and shouldn't be possible. Use other
terminology, if you like. Ian then asked if he should delete the old
directory before performing an upgrade, to which you responded that doing so
shouldn't be necessary, and we should just "install new R and then use
Package Manager to install packages."

As I understood this, it means a file was accidentally copied over when it
shouldn't have been, so the fix is to install packages directly from CRAN
using the Package Manager, a script or some other method, just so long as
there's no copying. Alternatively, copying must be followed by
update.packages(checkBuilt=T).

Now, I'm sure that I have this wrong, someplace, and since I update multiple
computers on multiple platforms, without your expertise in R, I'm trying to
understand this well enough so that I can avoid similar problems. If I
install a new version of R and then, without doing anything else, either use
the Package Manager or a script to install the packages I want, would I
encounter the same problem?

Thank you,

Tom



> Thanks,
> Simon
>
>
> >
> >
> >>
> >>> Perhaps section 2.8 of the Windows FAQ should be incorporated into the
> Mac
> >>> FAQ? The checkBuilt trick is otherwise not brought to our attention.
> >>>
> >>> The FAQ could also be clearer on whether recommended packages can be
> >>> replaced with older versions using this method; it's much easier to
> >>> copy-and-paste everything in the directory than to hunt-and-peck for
> only
> >>> the packages that aren't installed by default. I'll submit that
> suggestion
> >>> to R-windows@r-project.org separately.
> >>>
> >>> - Tom
> >>>
> >>> On Wed, May 25, 2011 at 07:58, Prof Brian Ripley <
> ripley@stats.ox.ac.uk
> >>>> wrote:
> >>>
> >>> It's really odd that people blog about their own inefficient scripts
> >>>> rather
> >>>> than read the R documentation.
> >>>>
> >>>> Because this scripts checks (very inefficiently) if a package is
> already
> >>>> installed, it would not solve the problem discussed in this thread.
>  And
> >>>> install.packages() takes a vector of packages, and 'survival' is a
> >>>> recommended package and should always be installed.
> >>>>
> >>>> Because people have differing needs there are different ways to do
> this.
> >>>> But the ideas of
> >>>>
> >>>>
> >>>>
> >>>>
> http://cran.r-project.org/bin/windows/base/rw-FAQ.html#What_0027s-the-best-way-to-upgrade_003f
> >>>>
> >>>> suit many.
> >>>>
> >>>>
> >>>>
> >>>> On Wed, 25 May 2011, Tom Hopper wrote:
> >>>>
> >>>> There's a handy script to automate the update process that I came
> across
> >>>>
> >>>>> some time ago at
> >>>>>
> >>>>>
> >>>>>
> https://bridgewater.wordpress.com/2010/12/21/my-favorite-r-packages-installed-with-one-command/
> >>>>>
> >>>>> When you run the script, it will automatically install the libraries
> >>>>> that
> >>>>> you set up in the script. When you run it, it will install into the
> >>>>> first
> >>>>> location in .libPaths(). If you want packages installed in
> >>>>> ~/Library/R...,
> >>>>> then you need to check the "Default Library Paths" option in
> >>>>> R-->Preferences-->Startup. Alternatively, you could supply the lib=
> >>>>> argument
> >>>>> to the install.packages() call. With a little extra code, you could
> even
> >>>>> define the install location for each package individually.
> >>>>>
> >>>>> Here's a shortened version:
> >>>>> # Essential R packages: 2011-01-02
> >>>>> # Originally from: R packages I use commonly: 12/21/2010 twitter:
> >>>>> drbridgewater
> >>>>> #     Jeff S. A. Bridgewater
> >>>>> #
> >>>>>
> >>>>>
> >>>>>
> https://bridgewater.wordpress.com/2010/12/21/my-favorite-r-packages-installed-with-one-command/
> >>>>> #
> >>>>>
> >>>>> #list all packages currently installed
> >>>>> p<-c()
> >>>>>
> >>>>> #add essential packages:
> >>>>> p<-c(p,"survival")
> >>>>> p<-c(p,"Hmisc")
> >>>>> # add more packages here
> >>>>>
> >>>>> # UPDATE the repository list to point to your local repositories
> >>>>> repositories<-c("http://mirrors.softliste.de/cran/","
> >>>>> http://mirrors.softliste.de/cran/")
> >>>>> install_package<-function(pack,repositories)
> >>>>> {
> >>>>> if(!(pack %in% row.names(installed.packages())))
> >>>>> {
> >>>>> update.packages(repos=repositories, ask=F)
> >>>>> install.packages(pack, repos=repositories, dependencies=T)
> >>>>> }
> >>>>> require(pack,character.only=TRUE)
> >>>>> }
> >>>>>
> >>>>> for( pack in p)
> >>>>> {
> >>>>> install_package(pack,repositories)
> >>>>> }
> >>>>>
> >>>>>      [[alternative HTML version deleted]]
> >>>>>
> >>>>> _______________________________________________
> >>>>> R-SIG-Mac mailing list
> >>>>> R-SIG-Mac@r-project.org
> >>>>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
> >>>>>
> >>>>>
> >>>>> --
> >>>> Brian D. Ripley,                  ripley@stats.ox.ac.uk
> >>>> Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
> >>>> University of Oxford,             Tel:  +44 1865 272861 (self)
> >>>> 1 South Parks Road,                     +44 1865 272866 (PA)
> >>>> Oxford OX1 3TG, UK                Fax:  +44 1865 272595
> >>>>
> >>>>
> >>>       [[alternative HTML version deleted]]
> >>>
> >>> _______________________________________________
> >>> R-SIG-Mac mailing list
> >>> R-SIG-Mac@r-project.org
> >>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
> >>>
> >>>
> >> --
> >> Brian D. Ripley,                  ripley@stats.ox.ac.uk
> >> Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
> >> University of Oxford,             Tel:  +44 1865 272861 (self)
> >> 1 South Parks Road,                     +44 1865 272866 (PA)
> >> Oxford OX1 3TG, UK                Fax:  +44 1865 272595
> >>
> >
> >       [[alternative HTML version deleted]]
> >
> > _______________________________________________
> > R-SIG-Mac mailing list
> > R-SIG-Mac@r-project.org
> > https://stat.ethz.ch/mailman/listinfo/r-sig-mac
> >
> >
>
>

	[[alternative HTML version deleted]]

