Witold Eryk Wolski
2005-Feb-10 16:06 UTC
[Rd] Undocumented S4 methods: generic coerce and siglist matrix, Massvector
Hi,
While checking the package I am getting all the time the following
complain about the function:
Undocumented S4 methods:
generic coerce and siglist matrix,Massvector
I have not defined the function nowhere in the R files.
My gues is that this has something to do with the following definition
of the setAs function.
setAs("matrix","Massvector"
,def= function(from)
{
return(new("Massvector",from))
}
)
The problem is not to cheat the check mechanism. I knew that the warning
can be elminitad by by defining an alias of this function in one of the
Rd files.
Yours
Eryk
--
Dipl. bio-chem. Witold Eryk Wolski
MPI-Moleculare Genetic
Ihnestrasse 63-73 14195 Berlin
tel: 0049-30-83875219 __("< _
http://www.molgen.mpg.de/~wolski \__/ 'v'
http://r4proteomics.sourceforge.net || / \
mail: witek96@users.sourceforge.net ^^ m m
wolski@molgen.mpg.de
John Chambers
2005-Feb-10 21:01 UTC
[Rd] Undocumented S4 methods: generic coerce and siglist matrix, Massvector
Witold Eryk Wolski wrote:> Hi, > While checking the package I am getting all the time the following > complain about the function: > > > Undocumented S4 methods: > generic coerce and siglist matrix,Massvector > > > I have not defined the function nowhere in the R files. > My gues is that this has something to do with the following definition > of the setAs function. > > setAs("matrix","Massvector" > ,def= function(from) > { > return(new("Massvector",from)) > } > )It certainly does. From the documentation of setAs(): ---------------- With this explanation as background, the function setAs does a fairly obvious computation: It constructs and sets a method for the function coerce with signature c(from, to), using the def argument to define the body of the method. -------------------> > The problem is not to cheat the check mechanism. I knew that the warning > can be elminitad by by defining an alias of this function in one of the > Rd files.No cheating seems needed. The setAs() call is part of your software & presumably you document it somewhere. You do have to construct the corresponding alias in the same .Rd file, but it doesn't amount to cheating. It's true that a user would have to be unusually well-informed to know how to ask for the corresponding documentation explicitly.> > Yours > > Eryk >