Would like to reshape a data set with the structure below in a way that would help me create a data set for time series analysis
The data set below is an example and I have multiple variables as columns and Multiple Brands as rows along with their respective timeperiods
Brand Period V1 V2 V3
A Week1 1 2 3
A Week2 1 2 3
A Week3 1 2 3
B Week1 1 2 3
B Week2 1 2 3
B Week3 1 2 3
C Week1 1 2 3
C Week2 1 2 3
C Week3 1 2 3
the data set would look like this :
Period A_V1 A_V2 A_V3 B_V1 B_V2 B_V3 C_V1 C_V2 C_V3
Week1
Week2
Week3
Was wondering if there is some function in the reshape package or anyother package I can use