[ Note that this discussion really belongs to r-help, not r-devel, but
a nyway.

>>>>> On Tue, 27 Oct 2009 09:02:12 +1300,
>>>>> Etienne Laliberté (EL) wrote:

  > Many thanks Mathieu, following your answer I did a bit more focused
  > research and found out that because "mypackage" had a NAMESPACE, I had
  > to create the following zzz.R file instead:

  > .onLoad <-function (lib, pkg) {
  >     library.dynam("mypackage", pkg, lib)
  > }

If you have a namespace you only need a

  useDynLib(mypackage)

in the NAMESPACE file, everything else is done automatically for you
(no need for the above zzz.R).

Best,
Fritz

-- 
-----------------------------------------------------------------------
Prof. Dr. Friedrich Leisch 

Institut für Statistik                          Tel: (+49 89) 2180 3165
Ludwig-Maximilians-Universität                  Fax: (+49 89) 2180 5308
Ludwigstraße 33
D-80539 München                     http://www.statistik.lmu.de/~leisch
-----------------------------------------------------------------------
   Journal Computational Statistics --- http://www.springer.com/180 
          Münchner R Kurse --- http://www.statistik.lmu.de/R

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to