Hi !

I am trying to organise gigantic tables and get kinda stuck.

I have a dataframe such as :

```
v1 <- c('D7','X',23)
v2 <- c('D7','Y',56)
v3 <- c('D7','Z',84)
v4 <- c('D8','X',11)
v5 <- c('D8','Y',12)
v6 <- c('D8','Z',35)
book <- data.frame(v1,v2,v3,v4,v5,v6)
```

and I have the uniqued values of column 1:

```
lvl <- unique(book[,1])
> lvl
[1] "D7" "D8"
```

I am able to creat a matrix with the levels (D7, D8 here)

I want to add X, Y and Z as columns, and the values in the matching lines.

I guess I'll need to use some homemade functions, but I'll definitly need help to get started.

Thank you so much!

D