[R] cluster, mona error
Morten Mattingsdal
morten.mattingsdal at student.uib.no
Thu Jan 27 15:06:32 CET 2005
Hi
I have a problem using the package cluster on my binary data. I want to
try mona at first. But i get the an error.
hc<-read.table("all.txt", header=TRUE, sep="\t", row.names=1)
srt(hc)
`data.frame': 51 obs. of 59 variables:
$ G1p : int 2 1 1 1 1 1 1 1 1 1 ...
$ G1q : int 1 1 1 1 1 1 1 1 1 1 ...
$ G2p : int 1 1 1 1 1 1 1 1 1 1 ...
$ G2q : int 1 1 1 1 1 1 1 1 1 1 ...
$ G3p : int 1 1 1 1 1 1 1 1 1 1 ...
m<-mona(hc)
Error in mona(hc) : All variables must be binary (factor with 2 levels).
I find this strange when the cluster dataset "animals" have the same
structure as my data.
srt(animals)
`data.frame': 20 obs. of 6 variables:
$ war: int 1 1 2 1 2 2 2 2 2 1 ...
$ fly: int 1 2 1 1 1 1 2 2 1 2 ...
$ ver: int 1 1 2 1 2 2 2 2 2 1 ...
$ end: int 1 1 1 1 2 1 1 2 2 1 ...
$ gro: int 2 2 1 1 2 2 2 1 2 1 ...
$ hai: int 1 2 2 2 2 2 1 1 1 1 ...
m<-mona(animals) #works fine
what is this error trying to tell me?
mvh
morten
More information about the R-help
mailing list