[R-pkg-devel] Private S3 Method not Found
Jeff Newmiller
jdnewm|| @end|ng |rom dcn@d@v|@@c@@u@
Mon Feb 17 19:04:40 CET 2020
I don't think it is possible to avoid exporting S3 methods from a package and still have the class behave as intended. Use a regular function if name encapsulation is important to you.
On February 17, 2020 8:33:30 AM PST, bill using denney.ws wrote:
>Thanks for the pointer! Adding
>"S3method(knit_print_helper_formula,name)" to the NAMESPACE seems to
>have fixed it.
>
>For others who come across this, in roxygen2 parlance, that means
>using:
>
>#' @method knit_print_helper_formula name
>#' @export
>
>Even though the actual export is not desired.
>
>Thanks,
>
>Bill
>
>-----Original Message-----
>From: Duncan Murdoch <murdoch.duncan using gmail.com>
>
>On 17/02/2020 10:05 a.m., bill using denney.ws wrote:
>
>> Does anyone know why the S3 method for name class objects is not
>found
>> when checking the package?
>
>I think you need to register knit_print_helper_formula.name as an S3
>method even if the generic is not exported. I forget whether you do
>this in the NAMESPACE file or at runtime using registerS3method.
>
>______________________________________________
>R-package-devel using r-project.org mailing list
>https://stat.ethz.ch/mailman/listinfo/r-package-devel
--
Sent from my phone. Please excuse my brevity.
More information about the R-package-devel
mailing list