I installed a custom package which needs to know its own location on the disk. (It runs an executable that is included in the package.) In version 2.11.1 the .Library command gave me the necessary information. It returned the path C:\Program Files\R\R-2.11.1\library. I have noticed that in the 2.12.2 newly installed libraries are installed to something like C:\Documents and Settings\user\My Documents\R\win-library\2.12., but he .Library still points to C:\Program Files\R\R-2.11.1\library. Is there some function to return the path C:\Documents and Settings\user\My Documents\R\win-library\2.12? Thanks for any help that can be provided! -- View this message in context: http://r.789695.n4.nabble.com/Library-in-R-2-12-2-for-windows-tp3347351p3347351.html Sent from the R help mailing list archive at Nabble.com.
On Thu, Mar 10, 2011 at 9:56 PM, Oxxx <jonathan.todd.oxborrow at gmail.com> wrote:> I installed a custom package which needs to know its own location on the > disk. (It runs an executable that is included in the package.) ?In version > 2.11.1 the .Library command gave me the necessary information. ?It returned > the path C:\Program Files\R\R-2.11.1\library. ?I have noticed that in the > 2.12.2 newly installed libraries are installed to something like > C:\Documents and Settings\user\My Documents\R\win-library\2.12., but he > .Library still points to C:\Program Files\R\R-2.11.1\library. ?Is there some > function to return the path C:\Documents and Settings\user\My > Documents\R\win-library\2.12? ?Thanks for any help that can be provided! >See ?system.file -- Statistics & Software Consulting GKX Group, GKX Associates Inc. tel: 1-877-GKX-GROUP email: ggrothendieck at gmail.com
.libPaths() (on the same help page as .Library): and nothing has changed since R 2.11.1. However, to find a package, use .find.package, and your package should almost certainly be using system.file(package='pkgname'). On Thu, 10 Mar 2011, Oxxx wrote:> I installed a custom package which needs to know its own location on the > disk. (It runs an executable that is included in the package.) In version > 2.11.1 the .Library command gave me the necessary information. It returned > the path C:\Program Files\R\R-2.11.1\library. I have noticed that in the > 2.12.2 newly installed libraries are installed to something like > C:\Documents and Settings\user\My Documents\R\win-library\2.12., but he > .Library still points to C:\Program Files\R\R-2.11.1\library. Is there some > function to return the path C:\Documents and Settings\user\My > Documents\R\win-library\2.12? Thanks for any help that can be provided!-- Brian D. Ripley, ripley at 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
Thanks so much for the help! Sorry about not finding that info in the help. I must have overlooked it. My apologies. -- View this message in context: http://r.789695.n4.nabble.com/Library-in-R-2-12-2-for-windows-tp3347351p3348218.html Sent from the R help mailing list archive at Nabble.com.