[R] Syntax error with .First.lib

Phineas Campbell pcampbell at econ.bbk.ac.uk
Tue Jun 21 16:13:26 CEST 2005


I am trying to build a package which calls some c code.  I want to call the
dyn.load function when the package is loaded.  To do this I create a
.First.lib function in MyConv.R file:


.First.lib<-function("/home/phineas/R_HOME/R-2.0.1/library/", "MyConvolve"){
	### Intentionally empty body.  To be replaced by dyn.load function
}

R CMD check MyConvolve gives an R syntax error.

libname is the directory where the package is saved.  The package is being
stored in the standard library directory, is possible to pass NULL as this
value?

pkgname is the string representing the name of the package.


To clarify some notation; a package is a set of R data, code and objects to
be used when the package is installed, but a library is a compiled c or
Fortran binary which can be called by R


Should this question be posted to R-devel?

>version

platform sparc-sun-solaris2.9
arch     sparc
os       solaris2.9
system   sparc, solaris2.9
status
major    2
minor    0.1
year     2004
month    11
day      15
language R

Phineas Campbell
pcampbell at econ.bbk.ac.uk




More information about the R-help mailing list