And ...

?which

which(abs(x-y) >0)   # or if these are subject to FAQ 7.31, then
which( zapsmall( abs(x-y)) > 0 )

.. for second part of question.

-- David.
On Oct 12, 2010, at 1:43 PM, Bert Gunter wrote:

Try preusing an Intro to R for such elementary questions, please. Also
the R Help facility.

But...

?identical   ##(oddly enough...)
?"=="

But beware numerical issues -- see R FAQ 7.31.

-- Bert


On Tue, Oct 12, 2010 at 10:35 AM, ANJAN PURKAYASTHA
<anjan.purkayas...@gmail.com> wrote:
Hi,
I have two vectors, each of length 45000.
How do I compare the vectors to ascertain if they are identical. Secondly if they are NOT identical, how do I determine the indices of positions at which
the vectors differ?
Thanks,
Anjan


--
===================================
anjan purkayastha, phd.
research associate
fas center for systems biology,
harvard university
52 oxford street
cambridge ma 02138
phone-703.740.6939
===================================

       [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.




--
Bert Gunter
Genentech Nonclinical Biostatistics

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

David Winsemius, MD
West Hartford, CT

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to