Re: [R-pkg-devel] Lists vs Attributes

2021-10-01 Thread Jeff Newmiller
Duncan has used the phrase "do regular operations on the object" to divide the use cases and emphasized that needing the attributes might be important, but he did not come out and remind you that if you _do_ perform regular operations on it then the outputs of those operations are likely to lose

Re: [R-pkg-devel] Lists vs Attributes

2021-10-01 Thread Duncan Murdoch
On 01/10/2021 6:14 p.m., Reed A. Cartwright wrote: I'm rethinking the interface of a package, specifically how external binary data is formatted for use in R. I can't decide if it is better to use attributes to store metadata or use a list to hold the main data and metadata as separate elements.

[R-pkg-devel] Lists vs Attributes

2021-10-01 Thread Reed A. Cartwright
I'm rethinking the interface of a package, specifically how external binary data is formatted for use in R. I can't decide if it is better to use attributes to store metadata or use a list to hold the main data and metadata as separate elements. Here's is what one datatype currently looks like: L