Re: [Rd] unlist preserve common class?

2022-12-09 Thread Spencer Graves
On 12/9/22 4:33 AM, Duncan Murdoch wrote: On 08/12/2022 9:20 p.m., Gabriel Becker wrote: Hi Spencer, My 2c. According to the docs, factors are special-cased. Other S3 'classes' could be special-cased, such as Date in your example, I suppose, but it is not clear how what you're describing

Re: [Rd] unlist preserve common class?

2022-12-09 Thread Duncan Murdoch
On 08/12/2022 9:20 p.m., Gabriel Becker wrote: Hi Spencer, My 2c. According to the docs, factors are special-cased. Other S3 'classes' could be special-cased, such as Date in your example, I suppose, but it is not clear how what you're describing could be implemented for the general case. Supp

Re: [Rd] unlist preserve common class?

2022-12-09 Thread Gabriel Becker
Hi Spencer, Another, potentially somewhat less disruptive/more general option would be to add a stop.at.object or stop.at.nonlist (or alternatively list.only) argument, which would basically translate to "collapse the list structure to flat, but don't try to combine the leaf elements within the li