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
dummy_array(date) - average_temperature
- average_wind_velocity
Can I use attributes to do this? I know that I can fix attributes to the dummy array, so I could have for example
dummy_array - average_temperature(date)
- average_wind_velocity(date)
An this is easy to implement using
attr(dummy_array, "average_temperature") <- some_vector
attr(dummy_array, "average_wind_velocity") <- some_other_vector
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?