I have the following code:
df%>%group_by(var1, var2)%>%summarise(mean=mean(var3))
which yields:
var1 var2 mean
<fctr> <fctr> <dbl>
1 Handtuch INK 3.08
2 Handtuch KON 3.08
3 Kissen INK 3.15
4 Kissen KON 4.46
5 TV-klopf INK 3.69
6 TV-klopf KON 3.62
7 TV-streich INK 2.46
8 TV-streich KON 3.00
I want to test, whether the difference between the "INK" and "KON" of every similar level in var1 is significant, i.e. is "Handtuch INK" significantly different from "Handtuch KON" and is "Kissen INK" significantly different from "Kissen KON" etc.
Can anybody help me with the right R code? Thank you.