Re: [R] Syntax error with .First.lib

From: Uwe Ligges <ligges_at_statistik.uni-dortmund.de>
Date: Wed 22 Jun 2005 - 00:29:41 EST

Phineas Campbell wrote:

> 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"){

Your arguments do not have names, and they have to in function declarations ....

Uwe Ligges

> ### 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


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 01:37:51 2005

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