[R-sig-Debian] Installing Packages in R - slight bump in the road
Judson
judson0423 at gmail.com
Fri Jun 26 19:10:20 CEST 2009
Hi,
sorry this is so basic but I feel I'm so close to being able to sit
quietly in a corner and do exactly what I planned from the start that
I thought I would ask. All I want is to do is to run R (2.9.0 finally
up and running!, struggling a bit with ESS but I'll get there) and use
it to learn Bayesian analysis and some similar stuff. Actually I
bought Peter Dalgaard's "Introductory Statistics with R” yesterday
figuring the refresh - and R practice - would be good before starting
Jim Albert's book. So all I really need now is to install the
packages ISwR and LearnBayes (actually would like to throw in LearnEDA
also).
Now I have downloaded all three packages. But R doesn't recognize
then and won't install them. I have approximately 30 other packages
(some standard of course) that are downloaded and installed. Maybe
the following information can be used.
Although some of the function.packages() have a lib.loc argument I
don't see it for install.packages(). install.packages() does have a
lib argument - which defaults to .libPaths()[1].
The value of my .libPaths() is
[1] "/home/my_name/R/i486-pc-linux-gnu-library/2.9"
[2] "/usr/local/lib/R/site-library"
[3] "/usr/lib/R/site-library"
[4] "/usr/lib/R/library"
Copies of all of my downloaded packages (count=29) are in [4]
(including LearnBayes, LearnEDA, and ISwR but more on that). In fact,
R recognizes all packages in [4] except those three. 23 of the 29
(including my 3 of interest) are in [2]. Only something called
"Matrix" is in [3]. In [1] are 2 copies each of LearnBayes and
LearnEDA.
Perhaps of use also is that (because I had already experienced trouble
getting LearnBayes/EDA recognized) I downloaded the source code
(rather than binary) for ISwR and extracted it to [4].
So I have copies of all three - I just can't get R to recognize them.
Also, if helpful, my
.Library value is "/usr/lib/R/library";
hence R "likes" most of the packages there. Also, my
Sys.getenv("R_LIB_USER") is ~/R/i486-pc-linux-gnu-library/2.9 (i.e.
same as .libPaths()[1]).
If you have ideas, please tell me. Also, if you suggest
re-downloading after a little switcheroo like
.libPaths()[5] <-.libPaths()[1]; .LibPaths()[1] <-.libPaths()[4]
that makes (conceptual) sense to me but because the character string
name starts with "." I wouldn't know how to find it. I'm trying but I
know nothing. And at the very least, thanks for your patience.
Also, I hope it doesn’t matter right now but my Synaptic has started
“failing to fetch” a lot of stuff from my sources.list file and I need
to go to a Dell group to figure that one out so I would have a lot of
work to go to a direct system install (which I can’t figure out how R
would recognize any way). Thanks.
Judson
More information about the R-SIG-Debian
mailing list