So i currently have a data frame in the format of:
Product Jan Feb Mar Apr
Fish 0.5 0.2 0.3 0.7
Veg 0.3 0.1 0.8 0.5
Beef 0.8 0.9 0.4 0.6
and what I'm trying to do now is to reformat the data frame so that i would obtain:
Product Month Sell_rate
Fish Jan 0.5
Fish Feb 0.2
Fish Mar 0.3
Fish Apr 0.7
Veg Jan 0.3
Veg Feb 0.1
Veg Mar 0.8
Veg Apr 0.5
Beef Jan 0.8
Beef Feb 0.9
Beef Mar 0.4
Beef Apr 0.6
I tried implementing it by reshape:
new_df <- reshape(df, new_col = "Month", )
but i seemed to be doing it the wrong way. Could anyone help me out on this. Much appreciated