[R] src directory disappeared after installation of packages
tlumley at u.washington.edu
Wed Nov 21 23:11:41 CET 2001
On Wed, 21 Nov 2001, Jonathan Li wrote:
> I am using R on Debian Linux. I tried to install packages from inside R
> by calling
> function install.packages(), e.g., install.packages("tree"). The
> packages were
> installed successfully. However, I couldn't find the "src" subdirectory
> under the /usr/lib/R/library/tree directory,, which is supposed to
> contain the C, C++ and FORTRAIN source files, according to the "Writing
> R Extensions" page 4.
> By looking at tree.R by BDR, I know that src is supposed to have files
> such as BDRgrow1.c in it.
> Did I look in a wrong directory or are there something wrong with the
> way I use "install.packages()"?
> Your insights are highly appreciated.
An installed package doesn't have a src directory. Under Linux,
install.packages() downloads and compiles the package and puts the
resulting binary in $R_HOME/library. You have the option of whether to
delete the source package (a .tar.gz file). If you didn't it should be
in a subdirectory whose name begins with "Rinstdir", in your TMPDIR
(probably either ~/tmp or /tmp)
There seems to be confusion from time to time about the difference between
source packages (found on CRAN in /src/contrib/) and binary packages
(found on CRAN in bin/<operating system>/contrib or in your
$R_HOME/library directory). As with some other R topics, it's not that it
isn't documented, but it may not be obvious where to look.
lots of .c and .f files
lots of .R (or .s or .q) files
lots of .Rd files
Installed package (or binary package for Windows):
A shared library
A single file with no .R extension
examples from help pages
Thomas Lumley Asst. Professor, Biostatistics
tlumley at u.washington.edu University of Washington, Seattle
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
More information about the R-help