kruskal.test()とかwilcox.test()

Rのkruskal.test()とかwilcox.test()を間違えて使っていました…orz
これらでは以下のように

Usage:
kruskal.test(formula, data, subset, na.action, ...)

formula: a formula of the form 'lhs ~ rhs' where 'lhs' gives the data
values and 'rhs' the corresponding groups.

右辺(?)にあるrhsがgroupを示すのですが、普段使い慣れたglmでは

Usage:
glm(formula, family = gaussian, data, weights, subset,

A typical predictor has the form 'response ~ terms' where
'response' is the (numeric) response vector and 'terms' is a
series of terms which specifies a linear predictor for 'response'.
For 'binomial' models the response can also be specified as a
'factor'

とgroupに相当するresponseが左辺(?)に置かれます。
のでkruskal.test()でも左辺にgroupを置くのだと思い込んで2,3回気付かずに試行してた。
教訓ってことで恥さらしてみるorz