I have the dataframe below
Año inicio | Año final | Resultado |
---|---|---|
2000 | 2001 | 4 |
2002 | 2005 | 2 |
and I would like to transform it into
Año inicio | Año final | Año | Resultado |
---|---|---|---|
2000 | 2001 | 2000 | 4 |
2000 | 2001 | 2001 | 4 |
2002 | 2005 | 2002 | 2 |
2002 | 2005 | 2003 | 2 |
2002 | 2005 | 2004 | 2 |
2002 | 2005 | 2005 | 2 |
using R.
May u help me?