I have the following format of the data:
m1 m2 m3 names
1 24.5 28.4 26.1 1
2 23.5 34.2 28.3 2
3 26.4 29.5 24.3 3
4 27.1 32.2 26.2 4
5 29.9 20.1 27.8 5
How can I prepare this data to the format that I can feed to aov
in R?
I.e.
values ind name
1 24.5 m1 1
2 23.5 m1 2
3 26.4 m1 3
...
For one way anova I just used stack
command. How can I do it for two way anova, without having a loop?