Hi everyone, I have written a class with methods that extend generic functions such as as.data.frame or show. When I load this package, I want to ensure that these methods - along with the other functions in the file - are added to R's search path or updated, if necessary. I have made a package using check/build/INSTALL. Will a simple library() call on the package accomplish this? I recall reading somewhere that there is a way to force the sourcing of R files within the package, but I don't remember where... Many thanks, Derek> R.version_ platform sparc-sun-solaris2.6 arch sparc os solaris2.6 system sparc, solaris2.6 status major 1 minor 5.0 year 2002 month 04 day 29 language R -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
I need some help figuring out how to compile and include a straightforward FORTRAN program as part an R package. This may sound strange but it will allow us access to some well tested code from within R. I think the executable should go into the exec subdirectory but need some help on how to signal the R build utility that some particular source should be compiled and linked as a standalone program. Thanks in advance, Doug ----------------------------------------------------------------------------- Doug Nychka, Geophysical Statistics Project Email: nychka at ucar.edu National Center for Atmospheric Research Voice: 303-497-1711 PO Box 3000 FAX: 303-497-1333 Boulder, CO 80307-3000 Web: www.cgd.ucar.edu/~nychka Address for overnight mail: 1850 Table Mesa Drive, Boulder, CO 80305 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
ripley@stats.ox.ac.uk
2002-Jun-25 15:41 UTC
[R] building an exectuable as part of a package.
On Tue, 25 Jun 2002, Doug Nychka wrote:> I need some help figuring out how to compile and include a > straightforward FORTRAN program as part an R package. > > This may sound strange but it will allow us access to some well tested > code from within R. > > I think the executable should go into the exec subdirectory but need some > help on how to signal the R build utility that some particular source > should be compiled and linked as a standalone program.R INSTALL (not R CMD build)? I think you need to supply a Makefile in pkg/src, and I would probably put the Fortran source in a subdirectory of pkg/src. My guess is that a configure script will probably be needed if the package is to be portable (across Unix-alikes). -- 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 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Doug Nychka wrote:> > I need some help figuring out how to compile and include a > straightforward FORTRAN program as part an R package. > > This may sound strange but it will allow us access to some well tested > code from within R. > > I think the executable should go into the exec subdirectory but need some > help on how to signal the R build utility that some particular source > should be compiled and linked as a standalone program.You can start with the R manual "Writing R Extensions" and look at some other package sources. "S Programming" (by Venables and Ripley) will help either. Uwe Ligges -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Thank you! ----------------------------------------------------------------------------- Doug Nychka, Geophysical Statistics Project Email: nychka at ucar.edu National Center for Atmospheric Research Voice: 303-497-1711 PO Box 3000 FAX: 303-497-1333 Boulder, CO 80307-3000 Web: www.cgd.ucar.edu/~nychka Address for overnight mail: 1850 Table Mesa Drive, Boulder, CO 80305 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
?require "Yi, Derek" wrote:> > Hi everyone, > > I have written a class with methods that extend generic functions such as > as.data.frame or show. When I load this package, I want to ensure that > these methods - along with the other functions in the file - are added to > R's search path or updated, if necessary. I have made a package using > check/build/INSTALL. > > Will a simple library() call on the package accomplish this? I recall > reading somewhere that there is a way to force the sourcing of R files > within the package, but I don't remember where... > > Many thanks, > Derek > > > R.version > _ > platform sparc-sun-solaris2.6 > arch sparc > os solaris2.6 > system sparc, solaris2.6 > status > major 1 > minor 5.0 > year 2002 > month 04 > day 29 > language R > -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- > 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 > _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._