Perhaps utils is not loaded at the time that the profile runs. Try adding library(utils) before the assignInNamespace command.
On Tue, Oct 21, 2008 at 2:10 PM, Brian Lunergan <[EMAIL PROTECTED]> wrote: > Gabor Grothendieck wrote: >> >> leaps is not in Depends or Imports for car. It is in Suggests >> and those don't get automatically pulled in when dependencies = NA. >> >> What you could do is to replace the builtin menuInstallPkgs with >> your own by running this: >> >> assignInNamespace("menuInstallPkgs", function (type = >> getOption("pkgType")) { >> install.packages(NULL, .libPaths()[1], dependencies = TRUE, type = >> type) >> }, ns = "utils") >> >> You will need to do that in every session that you want to use the install >> menu or you could just add it to your Rprofile.site file which you >> can find by running this: >> >> file.path(R.home(), "etc", "Rprofile.site") > > Okay, I must be missing something. Switched back up to v2.8.0 running on XP. > Modified Rprofile.site as follows: > > # Things you might want to change > > # options(papersize="a4") > # options(editor="notepad") > # options(pager="internal") > > # to prefer Compiled HTML help > options(chmhelp=TRUE) > > # to prefer HTML help > # options(htmlhelp=TRUE) > > # .Library.site <- file.path(chartr("\\", "/", R.home()), "site-library") > > # set a CRAN mirror > # local({r <- getOption("repos") > # r["CRAN"] <- "http://my.local.cran" > # options(repos=r)}) > > assignInNamespace("menuInstallPkgs", function (type = getOption("pkgType")) > { > install.packages(NULL, .libPaths()[1], dependencies = TRUE, type = > type) > }, ns = "utils") > > Saved the file and then opened Rgui. The following error appears: > > Error: could not find function "assignInNamespace" >> > > I'm guessing that means the program doesn't recognize the edit, but the > function did turn up when I ran ?assignInNamespace. I have no idea what went > wrong. Anybody more knowledgeable in the inner workings here care to point > me further on in the right direction, please? > > -- > > Brian Lunergan > Nepean, Ontario > Canada > > > --- > avast! Antivirus: Outbound message clean. > Virus Database (VPS): 081021-0, 2008-10-21 > Tested on: 2008-10-21 14:10:54 > avast! - copyright (c) 1988-2008 ALWIL Software. > http://www.avast.com > > > > ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.