----- Original Message -----
From: Michael Budnick <mbudnick08 <at> snet.net>
To: r-help <at> r-project.org
Cc:
Sent: Tuesday, September 10, 2013 4:06 PM
Subject: [R] Subtracting elements of a vector from each other stepwise
I am trying to figure out how to create a loop that will take the
difference of each member of a vector from each other and also spit out
which one has the least difference.
I do not want the vector member to subtract from itself or it must be able
to disregard the 0 obtained from subtracting from itself.
For example:
x = c(17,19,23,29)