Skip to content
Prev 58465 / 398502 Next

(no subject)

Reading the posting guide will tell you (among other things) to :
 a) use a sensible subject line
 b) give a reproducible example when possible

See other comments below.
On Wed, 2004-11-03 at 19:04, fang lai wrote:
I think the error refers to incorrect lengths during assignment. See
example below.
[,1] [,2]
[1,]    1    3
[2,]    2    4
[1] 1 3
Error in "[<-"(`*tmp*`, 1, , value = 1:3) :
    number of items to replace is not a multiple of replacement length

Or you might be trying something like
Error in "[<-"(`*tmp*`, 1, , value = wilcox.test(1:3, 1:10)) :
    number of items to replace is not a multiple of replacement length


Wilcoxon and all other two-group test statistics (when pairing is not
involved) can handle groups of different size. 
Try wilcox.test( 1:3, 1:10 ). 
To extract p-value only, do wilcox.test( 1:3, 1:10 )$p.value
Not directly. You could be expecting p-values to be in, say the 5th
column, but it might be stored elsewhere. But in your case I think the
results will not be stored anyway.
Is this a warning or an error ? There is a distinction.