I am trying to do a friedman test in the agricolae package. I tried this:
>with(data,friedman(seeds,trial,site, group=TRUE))
and get this error:
>Error in Summary.factor(c(1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, :
min not meaningful for factors
In addition: There were 39 warnings (use warnings() to see them)
> warnings()
Warning messages:
1: In mean.default(x, na.rm = TRUE) :
argument is not numeric or logical: returning NA
2: In mean.default(x, na.rm = TRUE) :
argument is not numeric or logical: returning NA
...
This is what my data looks like:
>str(data)
'data.frame': 41 obs. of 6 variables:
$ ID : int 20 34 41 48 62 69 76 97 104 146 ...
$ site : Factor w/ 3 levels "Benton N","Benton S",..: 1 1 1 1 2 2 2 2 2 2
$ plot : int 3 5 6 7 1 2 3 6 7 13 ...
$ trial : Factor w/ 2 levels "planting7","preplanting7": 1 1 1 1 1 1 1 1 1 1
$ treatment: Factor w/ 2 levels "control","seed": 1 1 1 1 1 1 1 1 1 1 ...
$ seeds : num 27.9 29.3 29.4 29 28.6 ...
I don't know how to make it work. Seeds should be numeric already. Site and plot aren't, but why would they need to be?
thanks