Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
原始数据如下所示:
type value 1 a 10 2 a 20 3 a 30 4 b 50 5 b 10 6 b 20
融化的数据如下所示:
1 a value 10 2 b value 10
我想将 wilcox.test 应用于 a,b 来检查 a 是否大于 b。怎么做?谢谢。
我认为您不需要融化数据。
raw给定一个包含您的raw(未融化的)数据的 data.frame
raw
wilcox.test(value ~ type, data = raw)
应该管用。