Description
Hello,
I am curious to know if you would be interested in implementing write_excel
as a generic function that dispatches on classes of objects.
My primary use case for this design feature is to be able to implement methods on custom classes that I use internally in my organization. Practically, this will enable a single call (write_excel
) to handle many types of objects (e.g., list
, data.frame
, custom.class
). Handling custom classes allows me to transform custom objects into an appropriate list
or data.frame
structure to then pass along to, for example, write_excel.data.frame
or write_excel.list
.
This implementation is not critical, as there are many workarounds. For example, I could implement the generic in my internal packages, or I could use an explicit function for each custom class, like write_excel_myclass
(which appears to be more polite and appropriate according to Advanced R (2e) and R Packages (2e)). However, I thought it would be worthwhile to try the source first.
I have no experience maintaining a publicly available package, so I'm not entirely sure how this implementation might break existing code. My admittedly novice perspective is that it wouldn't impact much existing code and would be straightforward to implement. I'd love to know your thoughts on this, if you have time.
Thank you for your consideration. Regardless, I use this package almost daily and derive a lot of utility from the functionality. I appreciate your development and maintenance efforts.
Best,
Christian Million