Hi,
I'm trying to write a function to determine the euclidean distance 
between x (one point) and y (a set of n points). How should I pass y to 
the function? Until now, I used a matrix like that:

|      [,1]  [,2]  [,3]
[1,]      0      2      1
[2,]      1      1      1
|

Which would pass the points (0,2,1) and (1,1,1) to that function.

However, when I pass x as a normal (column) vector, the two variables 
don't match in the function. I either have to transpose x or y, or save 
a vector of vectors an other way.

My question: What is the standard way to save more than one vector in R? 
(my matrix y)
Is it just my y transposed or maybe a list or something I don't yet know?

Thanks in advance,
  Alex


	[[alternative HTML version deleted]]

