[R-pkg-devel] New 'extptr.as.ref' argument in identical() causing check failures

Simon Urbanek @|mon@urb@nek @end|ng |rom R-project@org
Wed Feb 2 01:45:00 CET 2022


Andrew,

you should not re-define identical, it is not a semantic operation and does NOT test equality. Did you mean to write a `==` method instead?

Cheers,
Simon



> On Feb 2, 2022, at 9:20 AM, Andrew Plowright <plowright.andrew using gmail.com> wrote:
> 
> Hello, I have an 'identical()' method in my library
> 
> https://github.com/andrew-plowright/TileManager/blob/0f213a6bcce4bc4b6d0f5e6672660409e09c22c5/R/tileScheme-methods.R#L198
> 
> I recently started getting a warning message regarding a new
> 'extptr.as.ref' argument that was added to R-devel in December. When
> running devtools::check_rhub() I get:
> 
> ```
> * checking for code/documentation mismatches ... WARNING
> identical
>                 TRUE, ignore.bytecode = TRUE, ignore.environment =
>                 FALSE, ignore.srcref = TRUE, extptr.as.ref = FALSE)
>  Code: function(x, y, num.eq = TRUE, single.NA = TRUE, attrib.as.set =
> Codoc mismatches from documentation object 'identical':
>  Docs: function(x, y, num.eq = TRUE, single.NA = TRUE, attrib.as.set =
>                 TRUE, ignore.bytecode = TRUE, ignore.environment =
>                 FALSE, ignore.srcref = TRUE)
>  Argument names in code not in docs:
>    extptr.as.ref
> ```
> 
> I tried adding the 'extptr.as.ref' argument to my documentation, but now I
> get a new warning:
> 
> ```
>  Documented arguments not in \usage in documentation object 'identical':
> 
>    'extptr.as.ref'
>  Functions with \usage entries need to have the appropriate \alias
>  entries, and all their arguments documented.
>  The \usage entries must correspond to syntactically valid R code.
>  See chapter 'Writing R documentation files' in the 'Writing R
>  Extensions' manual.
> ```
> 
> So it seems that a warning is being generated both with or without the
> extptr.as.ref in my documentation. Any help would be appreciated, thanks!
> 
> Andrew
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-package-devel using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel
> 



More information about the R-package-devel mailing list