From friedrich.leisch at stat.uni-muenchen.de  Tue Oct 27 11:27:21 2009
From: friedrich.leisch at stat.uni-muenchen.de (Friedrich Leisch)
Date: Tue, 27 Oct 2009 11:27:21 +0100
Subject: [Rd] R CMD check: Error in .C
In-Reply-To: <554cd6450910261302i165e6342y7037f3df203df2f@mail.gmail.com>
References: <554cd6450910251958o5925a818t313d7174754407ee@mail.gmail.com>
	<1256553864.6689.16.camel@imapc13.epfl.ch>
	<554cd6450910261302i165e6342y7037f3df203df2f@mail.gmail.com>
Message-ID: <19174.51977.551370.417152@ridcully.stat.uni-muenchen.de>


[ 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



[Rd] R CMD check: Error in .C
Friedrich Leisch