Skip to content
Prev 39722 / 63421 Next

question about assignment warnings for replacement methods

Hi Duncan, Marc,
On 11-04-05 11:15 AM, Duncan Murdoch wrote:
Yes, 'replacementMethod(object) <- newValue' vorks indeed, but
not 'replacementMethod(object) = newValue'.
In the case reported by Marc, replacementMethod was both: a
replacement (generic) function and a replacement method. And the
man page had an alias for both. Marc replaced

   replacementMethod(object) = newValue

with

   \S4method{replacementMethod}{signature_list}(object)<- newValue

and that solved the problem. But replacing '=' with '<-' solves it too.

Shouldn't 'R CMD check' treat the 2 assignment operators the same way
since they are equivalent?

Thanks!
H.