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.test
to 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 beBest Answer:
You can create your group usingrep()
and apply your function by group:dplyr
:If you have better answer, please add a comment about this, thank you!
Source: Stackoverflow.com
Leave a Review