문제

raw Data looks like this:

  type value
1  a    10
2  a    20
3  a    30
4  b    50
5  b    10
6  b    20

melted data looks like this:

1 a value 10
2 b value 10

I want to apply wilcox.test to a,b To check whether a is greater than b. How to do that? thanks.

도움이 되었습니까?

해결책

I don't think you need to melt the data.

given a data.frame raw containing your raw (unmelted) data

wilcox.test(value ~ type, data = raw)

should work.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top