[R] Syntax error with .First.lib

From: Phineas Campbell <pcampbell_at_econ.bbk.ac.uk>
Date: Wed 22 Jun 2005 - 00:13:26 EST


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@econ.bbk.ac.uk



R-help@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 Received on Wed Jun 22 00:19:31 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:32:56 EST