From Kurt@Horn|k @end|ng |rom wu@@c@@t  Tue Mar 12 16:52:37 2019
From: Kurt@Horn|k @end|ng |rom wu@@c@@t (Kurt Hornik)
Date: Tue, 12 Mar 2019 16:52:37 +0100
Subject: [Rd] 
 Spurious warning from checkReplaceFuns about a non-replacement
 function
In-Reply-To: <CAJmOi+PXJcXrf+e=mWeiPj=TTaxjB7trUTyUBOF0FqfCfY0_xw@mail.gmail.com>
References: <CAJmOi+PXJcXrf+e=mWeiPj=TTaxjB7trUTyUBOF0FqfCfY0_xw@mail.gmail.com>
Message-ID: <23687.54725.494402.883738@hornik.net>

>>>>> Hugh Parsonage writes:

> If a function contains the pattern `<-` it is (with a few exceptions)
> deemed to be a replacement function and in particular must have second
> argument `value` to pass R CMD check.

> Consider the function %<->% or any other function containing <- within
> grapes. I claim that such functions should not be considered
> replacement functions and thus the R CMD check should not require its
> second argument to be `value`.

I just committed c76224 which drops %xxx% binops from the list of
(probable) replacement functions.

Thanks for spotting this!

Best
-k

> Recommend in the function tools::checkReplaceFuns

> grep("<-", objects_in_code,
>         value = TRUE)

> be changed to

> grep("<-$", objects_in_code,
>         value = TRUE)


> Hugh.

> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel



[Rd] Spurious warning from checkReplaceFuns about a non-replacement function
Kurt Hornik