[Rd] user interface and documentation of setIs and setAs,
some suggestions (S4).
Witold Eryk Wolski
wolski at molgen.mpg.de
Fri Oct 8 15:18:45 CEST 2004
By reading the documentation for _setIs_ I noted that for the same
object three different names are used.
1) the name of the first argument in the functions coerce and replace in
setIs must be _obj_ (see example section or)
setIs("MVCa","list",coerce=function(obj){obj at list},replace=function(obj,value){obj at list<-value})
2) At the same time in the usage section:
setIs(class1, class2, test=NULL, coerce=NULL, replace=NULL,
by = character(), where = topenv(parent.frame()), classDef =,
extensionObject = NULL, doComplete = TRUE)
3) and finally in the argument section:
the object to 'class2', and to alter the object so that
'is(object, class2)' is identical to 'value'.
I much more like how setAs is implemented, we cast _from_ _to_ and so
the arguments in all this functions are named. Its much more consistent.
I would also suggest to replace the keyword _def_ in the setAs function
by _coerce_ as it is in the setIs function.
I thinke it will be nicer if bot methods will have a unified user
interface if possible. Of corse it may be that this is not possible for
reasons not known to me. In this case sorry.
/E
--
Dipl. bio-chem. Witold Eryk Wolski
MPI-Moleculare Genetic
Ihnestrasse 63-73 14195 Berlin _
tel: 0049-30-83875219 __("< 'v'
http://www.molgen.mpg.de/~wolski \__/ / \
mail: witek96 at users.sourceforge.net ^^ w w
wolski at molgen.mpg.de
More information about the R-devel
mailing list