Using the two list from below I would like to export a .csv file that has the values from l2 and l3 in their own seperate columns. Within those unique names in l there is a letter (e.g., A, B, C) and there is a number (e.g., 2001, 2002, 2003). I would to partition them so that the letters have its own column, and the number has a seperate column.
Expected Output:
| Letter | Number | Values from l2 |
Values from l3 |
|---|---|---|---|
| A | 2001 | 10 | 15 |
| B | 2002 | 11 | 16 |
| C | 2003 | 12 | 17 |
l <- list("A_2001","A_2001","B_2002","B_2002", "C_2003", "C_2003")
l2 <- list("1"= 10,
"2" = 11,
"3" = 12)
l3 <- list("1"= 15,
"2" = 16,
"3" = 17)