Dear All, I received warnings regarding a package: https://cran.r-project.org/web/checks/check_results_bujar.html The warning still occurred after I changed export(bujar, gcv.enet) to export(bujar) in NAMESPACE. The function bujar was defined in the package, so I probably missed something in Sec 1.5.6 in Writing R Extensions. Could somebody kindly advise how to address the warning? Thanks, Zhu Wang
[R-pkg-devel] Warning: S4 exports specified in 'NAMESPACE' but not defined in package
5 messages · Max Turgeon, Wang, Zhu, Sebastian Meyer
Good morning, I had a quick look at the source file on CRAN, and I don't see any evidence that you're using S4 classes...? Indeed, at the end of your function 'bujar', you are defining the class of the results using "class(x) <- value", which is an S3 idiom. If indeed you're using S3 instead of S4, then the correct section of WRE is 1.5.2, and therefore you'll need to clean up your NAMESPACE. Best, Max Turgeon Assistant Professor Department of Statistics Department of Computer Science University of Manitoba maxturgeon.ca<http://maxturgeon.ca>
From: R-package-devel <r-package-devel-bounces at r-project.org> on behalf of Wang, Zhu <wangz1 at uthscsa.edu>
Sent: June 1, 2020 11:34:27 AM
To: R-package-devel at r-project.org
Subject: [R-pkg-devel] Warning: S4 exports specified in 'NAMESPACE' but not defined in package
Sent: June 1, 2020 11:34:27 AM
To: R-package-devel at r-project.org
Subject: [R-pkg-devel] Warning: S4 exports specified in 'NAMESPACE' but not defined in package
******************************************************** Caution: This message was sent from outside the University of Manitoba. ******************************************************** Dear All, I received warnings regarding a package: https://cran.r-project.org/web/checks/check_results_bujar.html The warning still occurred after I changed export(bujar, gcv.enet) to export(bujar) in NAMESPACE. The function bujar was defined in the package, so I probably missed something in Sec 1.5.6 in Writing R Extensions. Could somebody kindly advise how to address the warning? Thanks, Zhu Wang [[alternative HTML version deleted]] ______________________________________________ R-package-devel at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Thanks Max for the very helpful reply. Best, Zhu From: Max Turgeon <Max.Turgeon at umanitoba.ca> Sent: Monday, June 1, 2020 11:53 AM To: Wang, Zhu <wangz1 at uthscsa.edu>; R-package-devel at r-project.org Subject: Re: Warning: S4 exports specified in 'NAMESPACE' but not defined in package Good morning, I had a quick look at the source file on CRAN, and I don't see any evidence that you're using S4 classes...? Indeed, at the end of your function 'bujar', you are defining the class of the results using "class(x) <- value", which is an S3 idiom. If indeed you're using S3 instead of S4, then the correct section of WRE is 1.5.2, and therefore you'll need to clean up your NAMESPACE. Best, Max Turgeon Assistant Professor Department of Statistics Department of Computer Science University of Manitoba maxturgeon.ca<http://maxturgeon.ca>
From: R-package-devel <r-package-devel-bounces at r-project.org<mailto:r-package-devel-bounces at r-project.org>> on behalf of Wang, Zhu <wangz1 at uthscsa.edu<mailto:wangz1 at uthscsa.edu>>
Sent: June 1, 2020 11:34:27 AM
To: R-package-devel at r-project.org<mailto:R-package-devel at r-project.org>
Subject: [R-pkg-devel] Warning: S4 exports specified in 'NAMESPACE' but not defined in package
Sent: June 1, 2020 11:34:27 AM
To: R-package-devel at r-project.org<mailto:R-package-devel at r-project.org>
Subject: [R-pkg-devel] Warning: S4 exports specified in 'NAMESPACE' but not defined in package
******************************************************** Caution: This message was sent from outside the University of Manitoba. ******************************************************** Dear All, I received warnings regarding a package: https://cran.r-project.org/web/checks/check_results_bujar.html The warning still occurred after I changed export(bujar, gcv.enet) to export(bujar) in NAMESPACE. The function bujar was defined in the package, so I probably missed something in Sec 1.5.6 in Writing R Extensions. Could somebody kindly advise how to address the warning? Thanks, Zhu Wang [[alternative HTML version deleted]] ______________________________________________ R-package-devel at r-project.org<mailto:R-package-devel at r-project.org> mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
This is a new check in R-devel. The NEWS say:
R CMD check etc now warn when a package exports non-existing S4 classes or methods, also in case of no "methods" presence
In your case, the NAMESPACE contains
exportClasses("bujar")
exportMethods("show")
but the package neither defines an S4 class "bujar" nor methods for the S4 generic "show". You should remove these two lines from your NAMESPACE. Best regards, Sebastian Meyer Am 01.06.20 um 18:34 schrieb Wang, Zhu:
Dear All, I received warnings regarding a package: https://cran.r-project.org/web/checks/check_results_bujar.html The warning still occurred after I changed export(bujar, gcv.enet) to export(bujar) in NAMESPACE. The function bujar was defined in the package, so I probably missed something in Sec 1.5.6 in Writing R Extensions. Could somebody kindly advise how to address the warning? Thanks, Zhu Wang [[alternative HTML version deleted]]
______________________________________________ R-package-devel at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Thanks Sebastian, and I appreciate the suggestion. Best, Zhu -----Original Message----- From: R-package-devel <r-package-devel-bounces at r-project.org> On Behalf Of Sebastian Meyer Sent: Monday, June 1, 2020 1:53 PM To: r-package-devel at r-project.org Subject: Re: [R-pkg-devel] Warning: S4 exports specified in 'NAMESPACE' but not defined in package This is a new check in R-devel. The NEWS say:
R CMD check etc now warn when a package exports non-existing S4 classes or methods, also in case of no "methods" presence
In your case, the NAMESPACE contains
exportClasses("bujar")
exportMethods("show")
but the package neither defines an S4 class "bujar" nor methods for the S4 generic "show". You should remove these two lines from your NAMESPACE. Best regards, Sebastian Meyer Am 01.06.20 um 18:34 schrieb Wang, Zhu:
Dear All, I received warnings regarding a package: https://cran.r-project.org/web/checks/check_results_bujar.html The warning still occurred after I changed export(bujar, gcv.enet) to export(bujar) in NAMESPACE. The function bujar was defined in the package, so I probably missed something in Sec 1.5.6 in Writing R Extensions. Could somebody kindly advise how to address the warning? Thanks, Zhu Wang [[alternative HTML version deleted]]
______________________________________________ R-package-devel at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
______________________________________________ R-package-devel at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel