I have a dataframe that looks like this:
 P   sample    sensor1    sensor2    sensor3........sensorP
 a   1         2.45       3.56       2.345          2.33
 a   2         2.37       3.46       2.22           1.98
 a   3         2.78       3.22       1.45           2.67
 a   N
I want it to look like this:
P  1_sensor1   2_sensor1   3_sensor1......N_sensorn1    2_sensor1    2_sensor2    
a  2.45        2.37        2.78                         3.56         3.46
and so on.... So split the sensors horiszontally and split the samples within each horizonatally too. I know its a reshape2 solution - I just can't get the syntax. The Sensors will have different names and the sample length can also vary...hence the N.
paul.