I'm having problems with check assignment functions using Roxygen.
Here's a pretty minimal example:
And when I ran check :
* checking for code/documentation mismatches ... WARNING Codoc mismatches from documentation object 'IDs': IDs<- Code: function(x, value) Docs: function(x, value, value) IDs<-.SpatialPolygonsDataFrame Code: function(x, value) Docs: function(x, value, value)
I do not understand where the second value comes from. I tried to exclude the @param value theory that Roxygen might automatically create an entry for the destination functions, but this does not eliminate the definition of (x,value,value) and gives a new warning complaining that I did not define the value .
Here the corresponding .Rd part .Rd generated:
\usage{ IDs(x, ...) \method{IDs}{default} (x, ...) \method{IDs}{SpatialPolygonsDataFrame} (x, ...) IDs(x, value) <- value \method{IDs}{SpatialPolygonsDataFrame} (x, value) <- value }
I do not see the signature (x, value, value) in which there is a check .
This is an S3 function, but it works on an S4 object. I think it will make it S3 anyway. But if it is not, then the problem is using @S3method .
reference
source share