Skip to content
Prev 241419 / 398500 Next

how to store a vector of vectors

I at least would need to see an actual example of your code to
be able to answer your question.

But why not just use dist() and take the appropriate column of the
resultant matrix?

mydist <- function(x, amat) {
# x is the single variable as a vector
# amat is the remaining variables as rows
alldist <- dist(rbind(x, amat))
as.matrix(alldist)[-1,1]
}

Sarah
On Sat, Nov 13, 2010 at 8:22 AM, Alexx Hardt <mikrowelle1234 at gmx.de> wrote: