Re: [Rd] Suggestion: Dimension-sensitive attributes

2009-07-10 Thread Laurent Gautier
Gautier [mailto:lgaut...@gmail.com] Sent: jueves, 09 de julio de 2009 14:15 Cc: Heinz Tuechler; Bengoechea Bartolomé Enrique (SIES 73); Tony Plate; Henrik Bengtsson; r-devel@r-project.org Subject: Re: [Rd] Suggestion: Dimension-sensitive attributes Starting by working on an interface

Re: [Rd] Suggestion: Dimension-sensitive attributes

2009-07-10 Thread SIES 73
In the case the metadata are stored in a list, that interface enforces the building of a list. (I said to ignore implementation for now, but paradoxically this made me consider possible implementations). Creating the list on the fly if it's not stored internally as a list should be cheap.

Re: [Rd] Suggestion: Dimension-sensitive attributes

2009-07-09 Thread SIES 73
Plate [mailto:tpl...@acm.org] Sent: miércoles, 08 de julio de 2009 18:01 To: r-devel@r-project.org Cc: Bengoechea Bartolomé Enrique (SIES 73); Henrik Bengtsson Subject: Re: [Rd] Suggestion: Dimension-sensitive attributes There have been times when I've thought this could be useful too. One way

Re: [Rd] Suggestion: Dimension-sensitive attributes

2009-07-09 Thread SIES 73
need. Enrique -Original Message- From: Heinz Tuechler [mailto:tuech...@gmx.at] Sent: jueves, 09 de julio de 2009 10:56 To: Bengoechea Bartolomé Enrique (SIES 73); Tony Plate; r-devel@r-project.org Cc: Henrik Bengtsson Subject: Re: [Rd] Suggestion: Dimension-sensitive attributes At 10:01

Re: [Rd] Suggestion: Dimension-sensitive attributes

2009-07-09 Thread Heinz Tuechler
Bengtsson Subject: Re: [Rd] Suggestion: Dimension-sensitive attributes At 10:01 09.07.2009, SIES 73 wrote: I've also had several use cases where I needed cell-like attributes, that is, attributes that have the same dimensions as the original array and are subsetted in the same way --along all its

Re: [Rd] Suggestion: Dimension-sensitive attributes

2009-07-09 Thread Laurent Gautier
Starting by working on an interface for such object(s) is probably the first step toward a unified solution, and this before about if and how R attributes are used. It would also help to ensure a smooth transition from the existing classes implementing a similar solution (first the interface

Re: [Rd] Suggestion: Dimension-sensitive attributes

2009-07-09 Thread SIES 73
: jueves, 09 de julio de 2009 14:15 Cc: Heinz Tuechler; Bengoechea Bartolomé Enrique (SIES 73); Tony Plate; Henrik Bengtsson; r-devel@r-project.org Subject: Re: [Rd] Suggestion: Dimension-sensitive attributes Starting by working on an interface for such object(s) is probably the first step toward

Re: [Rd] Suggestion: Dimension-sensitive attributes

2009-07-09 Thread SIES 73
Bengtsson; r-devel@r-project.org Subject: Re: [Rd] Suggestion: Dimension-sensitive attributes Starting by working on an interface for such object(s) is probably the first step toward a unified solution, and this before about if and how R attributes are used. It would also help to ensure a smooth

Re: [Rd] Suggestion: Dimension-sensitive attributes

2009-07-09 Thread Laurent Gautier
: Dimension-sensitive attributes Starting by working on an interface for such object(s) is probably the first step toward a unified solution, and this before about if and how R attributes are used. It would also help to ensure a smooth transition from the existing classes implementing a similar solution

Re: [Rd] Suggestion: Dimension-sensitive attributes

2009-07-08 Thread SIES 73
Hi, I agree with Henrik that his suggestion to have dimension vector attributes working like dimnames (see below) would be an extremely useful infrastructure adittion to R. If this is not considered for R-core, I am happy to try to implement this in a package, as a new class. And possibly do

Re: [Rd] Suggestion: Dimension-sensitive attributes

2009-07-08 Thread Tony Plate
There have been times when I've thought this could be useful too. One way to go about it could be to introduce a special attribute that controls how attributes are dealt with in subsetting, e.g., attr.dimname.like. The contents of this would be character data; on subsetting, any attribute

[Rd] Suggestion: Dimension-sensitive attributes

2009-06-07 Thread Henrik Bengtsson
Hi, maybe this has been suggested before, but would it be possible, without not breaking too much existing code, to add other dimension vector attributes in addition to 'dimnames'? These attributes would then be subsetted just like dimnames. Something like this: x - array(1:30, dim=c(2,3,5))