Subject: Eliminate repeated components from a vector X-Mailer: VM 7.00 under 21.4 (patch 6) "Common Lisp" XEmacs Lucid Reply-To: fjmolina at lbl.gov FCC: /home/f/.xemacs/mail/sent Does anyone know how I can eliminate repeated elements from a vector?
> x <- c(1,1,2,3,4,4,5) > x[1] 1 1 2 3 4 4 5> x <- unique(x) > x[1] 1 2 3 4 5 Regards, Andrew C. Ward CAPE Centre Department of Chemical Engineering The University of Queensland Brisbane Qld 4072 Australia andreww at cheque.uq.edu.au Quoting Francisco J Molina <fjmolina at lbl.gov>:> Subject: Eliminate repeated components from a vector > X-Mailer: VM 7.00 under 21.4 (patch 6) "Common Lisp" XEmacs Lucid > Reply-To: fjmolina at lbl.gov > FCC: /home/f/.xemacs/mail/sent > > > Does anyone know how I can eliminate repeated elements from a > vector? > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help >
Francisco J Molina wrote:> Subject: Eliminate repeated components from a vector > X-Mailer: VM 7.00 under 21.4 (patch 6) "Common Lisp" XEmacs Lucid > Reply-To: fjmolina at lbl.gov > FCC: /home/f/.xemacs/mail/sent > > > Does anyone know how I can eliminate repeated elements from a vector? >?unique ?duplicated Sundar
On Tue, 22 Apr 2003, Francisco J Molina wrote:> Subject: Eliminate repeated components from a vector > X-Mailer: VM 7.00 under 21.4 (patch 6) "Common Lisp" XEmacs Lucid > Reply-To: fjmolina at lbl.gov > FCC: /home/f/.xemacs/mail/sent > > > Does anyone know how I can eliminate repeated elements from a vector? >An easy one: ?unique David Scott _________________________________________________________________ David Scott Department of Statistics, Tamaki Campus The University of Auckland, PB 92019 Auckland NEW ZEALAND Phone: +64 9 373 7599 ext 86830 Fax: +64 9 373 7000 Email: d.scott at auckland.ac.nz Graduate Officer, Department of Statistics Webmaster, New Zealand Statistical Association: http://www.stat.auckland.ac.nz/nzsa/
Francisco J Molina wrote:>Subject: Eliminate repeated components from a vector >X-Mailer: VM 7.00 under 21.4 (patch 6) "Common Lisp" XEmacs Lucid >Reply-To: fjmolina at lbl.gov >FCC: /home/f/.xemacs/mail/sent > > >Does anyone know how I can eliminate repeated elements from a vector? > >______________________________________________ >R-help at stat.math.ethz.ch mailing list >https://www.stat.math.ethz.ch/mailman/listinfo/r-help > > > >Try "unique". Rick B.
Hello, Does anybody know where I can find an R function to carry out variable selection using stepwise similar (or even better) to the stepwise function available in S-Plus?. I have tried the mle.stepwise function available in the wle package but I am not getting accurate results. I have tried also the leaps package but it does not handle the options f-in and f-out like in either MINITAB or SAS. Thanks in advance Dr. Edgar Acuna University of Puerto Rico at Mayaguez
Hi On 25 Apr 2003 at 12:10, edgar at uprm.edu wrote:> Hello, > Does anybody know where I can find an R function to carry out variable > selection using stepwise similar (or even better) to the stepwise > function available in S-Plus?. I have tried the mle.stepwise function > available in the wle package but I am not getting accurate results. I > have tried also the leaps package but it does not handle the options > f-in and f-out like in either MINITAB or SAS.what about stepAIC from MASS library> > Thanks in advance > > Dr. Edgar Acuna > University of Puerto Rico at Mayaguez > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-helpCheers Petr petr.pikal at precheza.cz p.pik at volny.cz
If you are willing to try lightly tested software, consider "stepAIC.c" from "www.prodsyse.com". This was produced by modifying "stepAIC" from MASS. This can find significant interactions when neither main effect is already in the model and forces the linear term in the model when testing parabolics. The output includes an attribute "models" giving a posterior distribution over all models tested assuming a uniform prior, as described in Burnham and Anderson (2002) Model Selection and Multimodel Inference (Springer). hope this helps. spencer graves Petr Pikal wrote:> Hi > > On 25 Apr 2003 at 12:10, edgar at uprm.edu wrote: > > >>Hello, >>Does anybody know where I can find an R function to carry out variable >>selection using stepwise similar (or even better) to the stepwise >>function available in S-Plus?. I have tried the mle.stepwise function >>available in the wle package but I am not getting accurate results. I >>have tried also the leaps package but it does not handle the options >>f-in and f-out like in either MINITAB or SAS. > > > what about > > stepAIC from MASS library > > >>Thanks in advance >> >>Dr. Edgar Acuna >>University of Puerto Rico at Mayaguez >> >>______________________________________________ >>R-help at stat.math.ethz.ch mailing list >>https://www.stat.math.ethz.ch/mailman/listinfo/r-help > > > Cheers > Petr > petr.pikal at precheza.cz > p.pik at volny.cz > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help