title: R: How to add attributes to elements of an array?
body: <p>Lets say I have an array, dummy_array, whose elements correspond to a date. For each date I want to record a number of items; such as list, dummy_list_1; matrices, dummy_matrix_1; and arbitrary values, dummy_val_1. For example lets say I wanted to record the average temperature (scalar), average wind velocity (vector) etc at some fixed location every day. I would like to be able to access the data by assigning each element in the array a set of attruibutes</p>
  
  <pre><code>dummy_array(date) - average_temperature
                    - average_wind_velocity
  </code></pre>
  
  <p>Can I use attributes to do this? I know that I can fix attributes to the dummy array, so I could have for example</p>
  
  <pre><code>dummy_array - average_temperature(date)
              - average_wind_velocity(date)
  </code></pre>
  
  <p>An this is easy to implement using </p>
  
  <pre><code>attr(dummy_array, "average_temperature") &lt;- some_vector
  attr(dummy_array, "average_wind_velocity") &lt;- some_other_vector
  </code></pre>
  
  <p>However I need to set up the first approach so that I can pass the element to a routine and be able to process/update everything in parallel. How can this be done?</p>