Entering edit mode
                    7.0 years ago
        lessismore
        
    
        ★
    
    1.4k
    Dear all,
i have this table. does someone know how to de-aggregate it ?
plant   tissue  count
tomato  leaf    1
tomato  root    4
tomato  shoot   5
solanus leaf    3
solanus root    2
solanus shoot   4
what i want is a dataframe like that:
    leaf    root    shoot
tomato  1   4   5
solanus 3   2   4
thanks in advance for you tips
See below SO post, there are many alternatives, this is called "convert from long-to-wide format":
I add another option to solve this with tidyr:
1. reproduce the same table
2. make it wider