Skip to content

[R-pkg-devel] S4 methods

4 messages · Edgar Josymar Torrejón-Magallanes, Sebastian Meyer, Gábor Csárdi

#
Dear members

I just finished some minor updates to an R package (sizeMat) I've had on
CRAN (haven't had to update in a month). My package passes Check on my
local machine, but it just bounced back from CRAN with the message

Warning: S4 exports specified in 'NAMESPACE' but not defined in package
'sizeMat'

I use roxygen2 to build my package NAMESPACE and don't have any S4 exports
that I'm aware of.

Perhaps this might be related to changes in R version 4.0.0?
How could I fix this problem?

Thanks.
#
This is a new check in R-devel. The NEWS say:
In your case, the NAMESPACE contains
but your package does not define these S4 classes.

You seem to instruct roxygen2 to create these invalid directives using
@exportClass tags manually instead of just @export. Simply remove these
wrong @exportClass tags from your source files and regenerate your
NAMESPACE.

Best regards,

	Sebastian Meyer


Am 02.06.20 um 10:01 schrieb Edgar Josymar Torrej?n-Magallanes:
#
You export these S4 classes from your package:
https://github.com/cran/sizeMat/blob/c4d257a9108cde3ddb6e8eb2072cd567ae85b5c8/NAMESPACE#L13-L15

But these are not actually S4 classes, AFAICT. Remove the
`@exportClass` tags here:
https://github.com/cran/sizeMat/blob/c4d257a9108cde3ddb6e8eb2072cd567ae85b5c8/R/gonadMat-main.R#L47
https://github.com/cran/sizeMat/blob/c4d257a9108cde3ddb6e8eb2072cd567ae85b5c8/R/morphMat-main.R#L101
https://github.com/cran/sizeMat/blob/c4d257a9108cde3ddb6e8eb2072cd567ae85b5c8/R/morphMat-main.R#L305

Gabor

On Tue, Jun 2, 2020 at 10:57 AM Edgar Josymar Torrej?n-Magallanes
<ejosymart at gmail.com> wrote:
#
Thank you so much for your help.

I delete the exporClass and the warnings and error have disappeared.

Regards

El mar., 2 jun. 2020 a las 4:28, G?bor Cs?rdi (<csardi.gabor at gmail.com>)
escribi?: