From maechler at stat.math.ethz.ch  Fri Aug 28 10:34:56 2009
From: maechler at stat.math.ethz.ch (Martin Maechler)
Date: Fri, 28 Aug 2009 10:34:56 +0200
Subject: [Rd] Problem with standard generic methods in Matrix package
In-Reply-To: <op.uzbvvll7ke9egf@l017892.intranet.ens-lsh.fr>
References: <37353.193.51.130.16.1251272254.squirrel@keo.limsi.fr>
	<19094.40923.755278.599681@lynne.math.ethz.ch>
	<op.uzbvvll7ke9egf@l017892.intranet.ens-lsh.fr>
Message-ID: <19095.38576.64071.568795@lynne.math.ethz.ch>


>>>>> "SL" == Sylvain Loiseau <sloiseau at ens-lsh.fr>
>>>>>     on Thu, 27 Aug 2009 18:06:50 +0200 writes:

    SL> Hello,
    >> I think it would still be most efficient,
    >> if you  do  'R CMD build <yourpackage>'
    >> and make the   <yourpackage>.tar.gz  file available.
    >> 
    >> Ideally for every reader of this list, from a "public" URL;
    >> alternatively, send it per e-mail as attachment;
    >> if you use correct MIME type, i.e., one of

    SL> Ok, here is the minimal package producing the error :

    SL> http://panini.u-paris10.fr/~sloiseau/test_1.0.tar.gz

    SL> I have :

    SL> library(test)
    >> getAdjacentAsSparseMatrix()
    SL> [1] "dgCMatrix"
    SL> attr(,"package")
    SL> [1] "Matrix"
    SL> Erreur dans y[1L + 0L:(m - 1L) * (n + 1L)] <- x :
    SL> types (de S4 a double) incompatibles dans l'ajustement d'affectation de
    SL> type

Yes, Sylvain, you were right (in the other thread
       "R CMD check does not recognize S4 functions ...")
that your problem is very similar to Giles Hooker's one.

You both need to learn more about namespaces.

As help for you (and other readers),
I append a "fixed up" version (1.0-1) of your test package.

I hope this helps,
Martin Maechler

-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_1.0-1.tar.gz
Type: application/x-compressed-tar
Size: 1246 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-devel/attachments/20090828/cafd31e0/attachment.bin>


[Rd] Problem with standard generic methods in Matrix package
Martin Maechler