Re: [R-pkg-devel] Extending an S3 method, but putting the package in Suggests?

2017-03-14 Thread David Hugh-Jones
Hi Martin, Thanks. I figured that out after trying it myself, so I didn't do that. OTOH, a whole new package just so I can extend a method... I feel that life is too short. So, I cut the Gordian knot and just wrote as_FlexTable instead of as.FlexTable, and skipped the whole inheritance issue.

Re: [R-pkg-devel] Extending an S3 method, but putting the package in Suggests?

2017-03-14 Thread Martin Maechler
> David Hugh-Jones > on Tue, 14 Mar 2017 09:26:49 + writes: > Just out of interest, what would happen if I used the hacky solution of > simply exporting my own method like: > as.FlexTable <- function(x, ...) UseMethod("as.FlexTable") >

Re: [R-pkg-devel] Extending an S3 method, but putting the package in Suggests?

2017-03-14 Thread David Hugh-Jones
Thank you for this info and the suggestion! David On Tue, 14 Mar 2017 at 09:06, Martin Maechler wrote: > > David Hugh-Jones > > on Tue, 14 Mar 2017 02:46:35 + writes: > > David Hugh-Jones >

Re: [R-pkg-devel] Extending an S3 method, but putting the package in Suggests?

2017-03-14 Thread Martin Maechler
> David Hugh-Jones > on Tue, 14 Mar 2017 02:46:35 + writes: > David Hugh-Jones > on Tue, 14 Mar 2017 02:46:35 + writes: > Hi, > Cross-posted from SO: >

[R-pkg-devel] Extending an S3 method, but putting the package in Suggests?

2017-03-13 Thread David Hugh-Jones
Hi, Cross-posted from SO: http://stackoverflow.com/questions/42776058/extending-an-s3-generic-from-an-optional-package I have a package which provides an as.FlexTable method for its objects, extending the S3 generic from the ReporteRs package. So, my NAMESPACE file, generated by roxygen, has