In this post, we will see how to resolve How would I compare the values in each set of 4 rows to one value (Wilcox test specifying mu)?
Question:I need to compare the value in every four rows to one value (as mu) using a Wilcoxon signed rank sum test. For example if my data looks like this:
wilcox.testto compare each of the four values from df1 with one value as mu from df_stack2. Considering a df with just the first four rows it would be
Best Answer:You can create your group using
rep()and apply your function by group:
If you have better answer, please add a comment about this, thank you!