0

I want to create something like a pivote table from a dataframe in R. I have the a dataframe with several columns and several rows. Let's say it has this structure(it has many columns, I dont know how many (is variable) and I can guess with other variable their name:

     DATE     1      7      15      30
2008-01-01   value  value  value  value
2008-01-02   value  value  value  value

I need an output with this structure:

   DATE      TENOR    VALUE  
2008-01-01   1        value  
2008-01-01   7        value 
2008-01-01   15       value 
2008-01-01   30       value 
2008-01-02   1        value  
2008-01-02   7        value 
2008-01-02   15       value 
2008-01-02   30       value 

Did I explain myself?

Thanks in advance

arodrisa
  • 300
  • 4
  • 17

0 Answers0