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, b...@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.dun...@gmail.com> > >On 17/02/2020 10:05 a.m., b...@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@r-project.org mailing list >https://stat.ethz.ch/mailman/listinfo/r-package-devel -- Sent from my phone. Please excuse my brevity. ______________________________________________ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel