Re: [R-SIG-Mac] packages failed to load - Now fixed
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, rip...@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, UKFax: +44 1865 272595 ___ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac
Re: [R-SIG-Mac] packages failed to load - Now fixed
Simon, That's a better way, indeed. I had missed your previous post, so thank you for reposting. My original motivation for the script was to sync certain core packages across multiple machines, but it works well for upgrades, too. The script also provides a means of weeding out my library by not automatically installing old, unused packages. I find the Package Manager is great for installing individual packages, but is error-prone for installing a lot of packages at once (as a user interface...too many chances to, for instance, forget a package). Thanks, Tom On Wed, May 25, 2011 at 06:35, Simon Urbanek simon.urba...@r-project.orgwrote: Well, that's a bit convoluted way (I really don't see the point of that script) - if you want to re-install packages across R versions (not the topic of this thread!) it is far easier than that and I posted it here just a few days ago: # for packages from user location: install.packages(row.names(installed.packages(~/Library/R/2.12/library))) # for packages from system location: install.packages(row.names(installed.packages(/Library/Frameworks/R.framework/Versions/2.12/Resources/library))) but as I said, the Package Manager gives you the latter without the need to type anything ... Cheers, Simon On May 24, 2011, at 11:07 PM, 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 [[alternative HTML version deleted]] ___ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac
Re: [R-SIG-Mac] packages failed to load - Now fixed
Well, that's a bit convoluted way (I really don't see the point of that script) - if you want to re-install packages across R versions (not the topic of this thread!) it is far easier than that and I posted it here just a few days ago: # for packages from user location: install.packages(row.names(installed.packages(~/Library/R/2.12/library))) # for packages from system location: install.packages(row.names(installed.packages(/Library/Frameworks/R.framework/Versions/2.12/Resources/library))) but as I said, the Package Manager gives you the latter without the need to type anything ... Cheers, Simon On May 24, 2011, at 11:07 PM, 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 ___ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac
Re: [R-SIG-Mac] packages failed to load - Now fixed
Brian, Since the problem was fixed by updating packages with checkBuilt=T, wouldn't installing packages fresh using the script have avoided the problem? 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-wind...@r-project.org separately. - Tom On Wed, May 25, 2011 at 07:58, Prof Brian Ripley rip...@stats.ox.ac.ukwrote: 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, rip...@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, UKFax: +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
Re: [R-SIG-Mac] packages failed to load - Now fixed
On 25/05/2011, at 12:19 PM, Simon Urbanek wrote: Normally you just install new R and then use Package Manager to install packages to match your previous version. If you blow away old R, you will have no track of packages you installed before. I've been in the habit of keeping all the .tgz files in a directory and using that as a guide for installing packages in the new R. So I'm happy to trash the old R. Thanks Ian Ian Reeve Institute for Rural Futures University of New England Armidale, NSW 2351 02 67735145 ___ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac
[R-SIG-Mac] install.packages: location of system-wide library tree
Dear expeRts, On (my?) macs, .libPaths() contains two entries, with the first pointing to a user's library tree and the second to the system-wide library tree, as in ## begin code v - getRversion() userLib - Sys.glob(sprintf(~/Library/R/%s.%s/library, v$major, v$minor)) systemLib - sprintf(/Library/Frameworks/R.framework/Versions/%s.%s/Resources/library, v$major, v$minor) userLib == .libPaths()[1] systemLib == .libPaths()[2] # both return TRUE (on my system) ## end code When installing new packages, I would like to make them available to all users. However, the 'lib' parameter of 'install.packages' defaults to the first element of '.libPaths()'. How do I reliably specify the location of the system library: Is it always equal to '.libPaths()[-1]'? And why is '.Library.site' empty? Jochen sessionInfo() R version 2.13.0 (2011-04-13) Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit) Jochen Laubrock, Dept. of Psychology, University of Potsdam, Karl-Liebknecht-Strasse 24-25, 14476 Potsdam, Germany phone: +49-331-977-2346, fax: +49-331-977-2793 ___ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac
Re: [R-SIG-Mac] install.packages: location of system-wide library tree
See help(.Library). Sean On Wed, May 25, 2011 at 6:35 AM, jochen laubrock jochen.laubr...@gmail.com wrote: Dear expeRts, On (my?) macs, .libPaths() contains two entries, with the first pointing to a user's library tree and the second to the system-wide library tree, as in ## begin code v - getRversion() userLib - Sys.glob(sprintf(~/Library/R/%s.%s/library, v$major, v$minor)) systemLib - sprintf(/Library/Frameworks/R.framework/Versions/%s.%s/Resources/library, v$major, v$minor) userLib == .libPaths()[1] systemLib == .libPaths()[2] # both return TRUE (on my system) ## end code When installing new packages, I would like to make them available to all users. However, the 'lib' parameter of 'install.packages' defaults to the first element of '.libPaths()'. How do I reliably specify the location of the system library: Is it always equal to '.libPaths()[-1]'? And why is '.Library.site' empty? Jochen sessionInfo() R version 2.13.0 (2011-04-13) Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit) Jochen Laubrock, Dept. of Psychology, University of Potsdam, Karl-Liebknecht-Strasse 24-25, 14476 Potsdam, Germany phone: +49-331-977-2346, fax: +49-331-977-2793 ___ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac ___ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac
Re: [R-SIG-Mac] packages failed to load - Now fixed
On Wed, May 25, 2011 at 11:50, Prof Brian Ripley rip...@stats.ox.ac.ukwrote: 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. Thank you, Tom 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-wind...@r-project.org separately. - Tom On Wed, May 25, 2011 at 07:58, Prof Brian Ripley rip...@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, rip...@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, UKFax: +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, rip...@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, UKFax: +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
Re: [R-SIG-Mac] install.packages: location of system-wide library tree
.Library.site becomes not empty when you create a site library, for example by mkdir {PATH to R}/R/lib64/site-library (of course lib64 assumes a 64 bit architecture) Kasper On Wed, May 25, 2011 at 6:51 AM, Sean Davis sdav...@mail.nih.gov wrote: See help(.Library). Sean On Wed, May 25, 2011 at 6:35 AM, jochen laubrock jochen.laubr...@gmail.com wrote: Dear expeRts, On (my?) macs, .libPaths() contains two entries, with the first pointing to a user's library tree and the second to the system-wide library tree, as in ## begin code v - getRversion() userLib - Sys.glob(sprintf(~/Library/R/%s.%s/library, v$major, v$minor)) systemLib - sprintf(/Library/Frameworks/R.framework/Versions/%s.%s/Resources/library, v$major, v$minor) userLib == .libPaths()[1] systemLib == .libPaths()[2] # both return TRUE (on my system) ## end code When installing new packages, I would like to make them available to all users. However, the 'lib' parameter of 'install.packages' defaults to the first element of '.libPaths()'. How do I reliably specify the location of the system library: Is it always equal to '.libPaths()[-1]'? And why is '.Library.site' empty? Jochen sessionInfo() R version 2.13.0 (2011-04-13) Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit) Jochen Laubrock, Dept. of Psychology, University of Potsdam, Karl-Liebknecht-Strasse 24-25, 14476 Potsdam, Germany phone: +49-331-977-2346, fax: +49-331-977-2793 ___ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac ___ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac ___ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac
Re: [R-SIG-Mac] packages failed to load - Now fixed
On May 25, 2011, at 7:17 AM, Tom Hopper wrote: On Wed, May 25, 2011 at 11:50, Prof Brian Ripley rip...@stats.ox.ac.ukwrote: 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. 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-wind...@r-project.org separately. - Tom On Wed, May 25, 2011 at 07:58, Prof Brian Ripley rip...@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, rip...@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, UKFax: +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, rip...@stats.ox.ac.uk Professor of Applied Statistics,
Re: [R-SIG-Mac] packages failed to load - Now fixed
On Wed, May 25, 2011 at 15:23, Simon Urbanek simon.urba...@r-project.orgwrote: On May 25, 2011, at 7:17 AM, Tom Hopper wrote: On Wed, May 25, 2011 at 11:50, Prof Brian Ripley rip...@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-wind...@r-project.org separately. - Tom On Wed, May 25, 2011 at 07:58, Prof Brian Ripley rip...@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
Re: [R-SIG-Mac] packages failed to load - Now fixed
On Wed, May 25, 2011 at 9:52 AM, Tom Hopper tomhop...@gmail.com wrote: On Wed, May 25, 2011 at 15:23, Simon Urbanek simon.urba...@r-project.orgwrote: On May 25, 2011, at 7:17 AM, Tom Hopper wrote: On Wed, May 25, 2011 at 11:50, Prof Brian Ripley rip...@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? You should not. Sean 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-wind...@r-project.org separately. - Tom On Wed, May 25, 2011 at 07:58, Prof Brian Ripley rip...@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
Re: [R-SIG-Mac] packages failed to load - Now fixed
On Wed, May 25, 2011 at 15:57, Sean Davis sdav...@mail.nih.gov wrote: On Wed, May 25, 2011 at 9:52 AM, Tom Hopper tomhop...@gmail.com wrote: snip 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? You should not. Thank you. - Tom [[alternative HTML version deleted]] ___ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac
[R-SIG-Mac] ? as a valid help request
Hi all, I wonder if there could be a way to allow querys like the following to succeed by changes to the gui command line? ? Error: unexpected '' in ?” ?%*% Error: unexpected SPECIAL in ?%*% cheers, tim -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. ___ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac
Re: [R-SIG-Mac] ? as a valid help request
On May 25, 2011, at 11:14 AM, Timothy Bates wrote: Hi all, I wonder if there could be a way to allow querys like the following to succeed by changes to the gui command line? ? Error: unexpected '' in ?” ?%*% Error: unexpected SPECIAL in ?%*% cheers, tim Just surround the topic with quotes: ? and ?%in% This is covered in ?help: Some topics need to be quoted (by backticks) or given as a character string. There include those which cannot syntactically appear on their own such as unary and binary operators, function and control-flow reserved words (including if, elsefor, in, repeat, while, break and next. The other reserved words can be used as if they were names, for example TRUE, NA and Inf. HTH. Marc Schwartz ___ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac
Re: [R-SIG-Mac] ? as a valid help request
just do '?' On 25 May 2011, at 5:20 PM, Marc Schwartz wrote: ? Error: unexpected '' in “?” Thanks Mark and Ian, Glad it’s a straightforward and memorable workaround. And this is easy in the new GUI (which adds quotes around a selection. Still wish that the error told me that was a likely cause: I just assumed it was impossible to search on. Followup GUI query: Is there a was to go to the beginning of the command line directly? My method is to cmd-right select the line, then use right arrow to fall off the end of the selection leaving the cursor at the start (ready to type a ?) This fails: The right arrow just does nothing… As cmd-shift-? opens help, a lovely enhancement would be for cmd-cntrl-? to execute ?rGUISelection Then help would be just a matter of select and keystroke, with no need to delete the? or pollute the history. EnjoyR, tim -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. ___ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac
Re: [R-SIG-Mac] ? as a valid help request
On May 25, 2011, at 12:32 PM, Timothy Bates wrote: just do '?' On 25 May 2011, at 5:20 PM, Marc Schwartz wrote: ? Error: unexpected '' in “?” Thanks Mark and Ian, Glad it’s a straightforward and memorable workaround. And this is easy in the new GUI (which adds quotes around a selection. Still wish that the error told me that was a likely cause: I just assumed it was impossible to search on. Followup GUI query: Is there a was to go to the beginning of the command line directly? My method is to cmd-right select the line, then use right arrow to fall off the end of the selection leaving the cursor at the start (ready to type a ?) cntrl-a works for me on the GUI and I suspect on a terminal console session as well, since I have been told that it is a UNIX convention. -- David Winsemius, MD West Hartford, CT ___ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac
Re: [R-SIG-Mac] ? as a valid help request
On 25-05-2011, at 18:32, Timothy Bates wrote: just do '?' On 25 May 2011, at 5:20 PM, Marc Schwartz wrote: ? Error: unexpected '' in “?” Thanks Mark and Ian, Glad it’s a straightforward and memorable workaround. And this is easy in the new GUI (which adds quotes around a selection. Still wish that the error told me that was a likely cause: I just assumed it was impossible to search on. Followup GUI query: Is there a was to go to the beginning of the command line directly? My method is to cmd-right select the line, then use right arrow to fall off the end of the selection leaving the cursor at the start (ready to type a ?) This fails: The right arrow just does nothing… Command-left arrow Ctrl-A And you can create a DefaultKeyBinding.dict in the directory ~/Library/Keybindings with a mapping of the Home to the Cocoa cursor command moveToBeginningOfLine:. See http://www.hcs.harvard.edu/~jrus/site/cocoa-text.html For example, if you have a DefaultKeyBinding.dict file containing { /* home Shift+home*/ \UF729 = moveToBeginningOfLine:; $\UF729 = moveToBeginningOfLineAndModifySelection:; /* end Shift+end*/ \UF72B = moveToEndOfLine:; $\UF72B = moveToEndOfLineAndModifySelection:; } Home will move the cursor to the start of a line End will move the cursor to the end of a line Combined with a shift key, these will select from the current cursor position to the start/end of line. Berend ___ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac
[R-SIG-Mac] left-arrow doesn't unselect and move left (was ? as a valid help request)
On 25 May 2011, at 5:50 PM, Berend Hasselman wrote: The left arrow just does nothing when a selection has been made (whereas the right arrow undoes the selection, leaving the cursor to its right) Command-left arrow Ctrl-A … Again, thanks for the help: I think it is a bug that left-arrow does not deselect the selection and leave the cursor immediately to the left of the old selection. having hte left-arrow move left is completely standard on mac applications., where as control-A is Unix only. thanks again for the replies, t Home will move the cursor to the start of a line End will move the cursor to the end of a line PS: not keys I have unfortunately :-( -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. ___ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac
Re: [R-SIG-Mac] ? as a valid help request
On May 25, 2011, at 12:50 PM, Berend Hasselman wrote: Home will move the cursor to the start of a line End will move the cursor to the end of a line Not on my machine in the GUI. Goes to top or bottom of the console window. -- David Winsemius, MD West Hartford, CT ___ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac
Re: [R-SIG-Mac] ? as a valid help request
On 25-05-2011, at 19:10, David Winsemius wrote: On May 25, 2011, at 12:50 PM, Berend Hasselman wrote: Home will move the cursor to the start of a line End will move the cursor to the end of a line Not on my machine in the GUI. Goes to top or bottom of the console window. To get the behaviour I described you have to have a DefaultKeyBinding.dict with the appropriate key definitions. Otherwise indeed Home/End go to top/end of text/window. Berend ___ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac
Re: [R-SIG-Mac] ? as a valid help request
On 25 May 2011, at 18:14, Timothy Bates wrote: I wonder if there could be a way to allow querys like the following to succeed by changes to the gui command line? ? Error: unexpected '' in ?” Hi Tim, did you try to simply select the pattern (here ) and press CTRL+H or right-click for content menu and select Show Help for current Function? Cheers, --Hans ___ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac
[R-SIG-Mac] Key bindings in the GUI [Was: ? as a valid help request]
On May 25, 2011, at 1:10 PM, David Winsemius wrote: On May 25, 2011, at 12:50 PM, Berend Hasselman wrote: Home will move the cursor to the start of a line End will move the cursor to the end of a line Not on my machine in the GUI. Goes to top or bottom of the console window. What Berend meant is that if you want to re-define the behavior to be non-standard with the modifications he listed (which you cut out), you can have it behave that way. It is not the default or intended behavior, though. (Windows users may be more used to it which is presumably why he mentioned it). Just to re-iterate, the standard Mac way to go to the beginning of the line is CmdLeft. The standard Mac way to move up a paragraph is AltUp (which is equivalent to going to the beginning of a paragraph except when you are already there). There is an emacs equivalent CtrlA which goes to the beginning of the paragraph. Now, in fact he GUI behaves slightly differently, but no one noticed ;). Due to the special treatment of the prompt, the commands concerning the beginnings of things have special work-arounds, so for example beginning of the line equals beginning of the paragraph in the GUI. However, this is what people most commonly want, so I'm not sure it's abad thing. I'll see if I can make the behavior consistent, though. Cheers, Simon ___ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac
Re: [R-SIG-Mac] ? as a valid help request
Hans said: did you try to simply select the function and press CTRL+H or right-click for content menu and select Show Help for current Function”? fantastic Hans! PS: I looked in the help menu and saw nothing like “help on selection cntrl-H” …. that would help with newbie discovery (like me :-) ) Simon said: the GUI behaves slightly differently, but no one noticed ;). Due to the special treatment of the prompt, the commands concerning the beginnings of things have special work-arounds, so for example beginning of the line equals beginning of the paragraph in the GUI. However, this is what people most commonly want, so I'm not sure it's abad thing. I'll see if I can make the behavior consistent, though. Would be great: it is unusual not to be able to left-arrow out of a selection. Maybe I can get used to Cmd–left-arrow to go to beginning of line: I think I use the shift key to highlight so I can attend the new location of the cursor more easily. t -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. ___ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac
Re: [R-SIG-Mac] ? as a valid help request
On May 25, 2011, at 1:41 PM, Timothy Bates wrote: Hans said: did you try to simply select the function and press CTRL+H or right-click for content menu and select Show Help for current Function”? fantastic Hans! PS: I looked in the help menu and saw nothing like “help on selection cntrl-H” …. that would help with newbie discovery (like me :-) ) Simon said: the GUI behaves slightly differently, but no one noticed ;). Due to the special treatment of the prompt, the commands concerning the beginnings of things have special work-arounds, so for example beginning of the line equals beginning of the paragraph in the GUI. However, this is what people most commonly want, so I'm not sure it's abad thing. I'll see if I can make the behavior consistent, though. Would be great: it is unusual not to be able to left-arrow out of a selection. Maybe I can get used to Cmd–left-arrow to go to beginning of line: I think I use the shift key to highlight so I can attend the new location of the cursor more easily. Now fixed. Cheers, Simon ___ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac