Hi, Just a silly question about R source package: I downloaded some source package of R and found there are some source codes written in C, is this true for all the R packages? but it seems that not all the functions described in the package are contained in the source package written in C. Could anybody explain to me the structure of the source package and how it is created? Thanks. James --------------------------------- [[alternative HTML version deleted]]
The minimum you need is to have a single file, DESCRIPTION, plus R and man directories/folders which contain your .R and .Rd files respectively. A package need not use C and I suspect most don't. On 4/12/06, James Anderson <janderson_net at yahoo.com> wrote:> Hi, > Just a silly question about R source package: > I downloaded some source package of R and found there are some source codes written in C, is this true for all the R packages? but it seems that not all the functions described in the package are contained in the source package written in C. Could anybody explain to me the structure of the source package and how it is created? > > Thanks. > James > > > --------------------------------- > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html >
On Wed, 12 Apr 2006, James Anderson wrote:> Hi, > Just a silly question about R source package: > I downloaded some source package of R and found there are some source > codes written in C, is this true for all the R packages? but it seems > that not all the functions described in the package are contained in the > source package written in C. Could anybody explain to me the structure > of the source package and how it is created? >The package structure is described in the "Writing R Extensions" manual, and each package has a set of subdirectories. All packages should have a man/ subdirectory with help files and nearly all will have an R/ directory with R code. Many packages also have compiled code in C or Fortran, which will be in a src/ subdirectory. Other important directories are tests/, data/, and inst/doc/ (where vignettes live). One way to do some of the set-up automatically is with the package.skeleton function. -thomas Thomas Lumley Assoc. Professor, Biostatistics tlumley at u.washington.edu University of Washington, Seattle