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
Buenas tardes amiga/o,

You can use `dcast()`:

    df
        plant tissue count
    1  tomato   leaf     1
    2  tomato   root     4
    3  tomato  shoot     5
    4 solanus   leaf     3
    5 solanus   root     2
    6 solanus  shoot     4
    
    require(data.table)
    
    dcast(data = df, formula = plant ~ tissue, value.var = 'count')
        plant leaf root shoot
    1 solanus    3    2     4
    2  tomato    1    4     5

Kevin
