Entering edit mode
11 months ago
sata72
•
0
I want to convert this data to two column:
data
treat control
1 0.166666667 0.254237288
2 0.555555556 0.366666667
3 0.000000000 0.083333333
4 0.478260870 0.500000000
5 0.695652174 0.333333333
6 0.000000000 0.000000000
7 0.000000000 0.000000000
8 0.000000000 0.000000000
9 0.000000000 0.000000000
10 0.000000000 0.000000000
convert to:
status value
control 0.254237288
control 0.366666667
control 0.083333333
control 0.5
control 0.333333333
control 0
control 0
control 0
control 0
control 0
treat 0.166666667
treat 0.555555556
treat 0
treat 0.47826087
treat 0.695652174
treat 0
treat 0
treat 0
treat 0
treat 0
Thanks. there is this error:
The data of two column are not the same dimension there are some NA. may due to that?
You need to pass a column, so
id.vars = "rows"
should work.Thanks