Skip to content

count definite categories

3 messages · Christian Schulz, Peter Dalgaard, Brian Ripley

#
Hello,

i  calculate with the formula  conf=Sum(2*Xn^n)   
definite number for binary configurations .
How it is possible to count the  number of different conf ?   

example:
384
384
512
512
512

the result should be 2  .

Thanks for advance & regards,
Christian


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
christian <ozric at web.de> writes:
length(unique(x))
#
I don't understand what you mean by `definite number' or `definite
categories' (might this be a mis-translation?), but I think you are
looking for table() or unique(), both of which would tell you there were
two categories.
On Sun, 24 Feb 2002, christian wrote: