First, happy holidays, everyone! Thanks to the R team for bringing out 1.4 before the new year. I have 10000 integer triplets stored in A[1:10000, 1:3]. I would like to find the unique triplets among the 10000 ones with possible duplications. What is the easiest way for this. I know the function unique(), which apply to a vector, not the 10000*3 array in my problem. Thanks in advance. Jason ====Jason G. Liao, Ph.D. Division of Biometrics UMDNJ School of Public Health 335 George Street, Suite 2200 New Brunswick, NJ 08903-2688 phone (732) 235-9748, fax (732) 235-9777 http://www.geocities.com/jg_liao __________________________________________________ -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Wed, 19 Dec 2001, Jason Liao wrote:> First, happy holidays, everyone! Thanks to the R team for bringing out > 1.4 before the new year. > > I have 10000 integer triplets stored in A[1:10000, 1:3]. I would like > to find the unique triplets among the 10000 ones with possible > duplications. What is the easiest way for this. I know the function > unique(), which apply to a vector, not the 10000*3 array in my problem.Well, new in 1.4.0 is unique.data.frame(), so you could either use that or copy its idea. -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Jason Liao <jg_liao at yahoo.com> writes:> First, happy holidays, everyone! Thanks to the R team for bringing out > 1.4 before the new year. > > I have 10000 integer triplets stored in A[1:10000, 1:3]. I would like > to find the unique triplets among the 10000 ones with possible > duplications. What is the easiest way for this. I know the function > unique(), which apply to a vector, not the 10000*3 array in my problem.As of 1.4.0 (!): unique(as.data.frame(A)) -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._