Closed GegznaV closed 2 years ago
chk.hy()
checks whether the object is of class hyperSpec, regardless of its validity.validObject()
checks whether an S4 object is valid (regardless of whether it is a hyperSpec object).So,
chk.hy()
is not needed when method dispatch guarantees that the object if of class hyperSpec.
$spc
) it makes sense to trigger a validity check before returning.
@cbeleites, why in some functions only
validObject()
, in some onlychk.hy()
, and in some bothvalidObject()
andchk.hy()
are used? What is the pattern? How to know which combination should be used?