SyntaxFix
Write A Post
Hire A Developer
Questions
As defined on Wikipedia, this should do it.
euc.dist <- function(x1, x2) sqrt(sum((x1 - x2) ^ 2))
There's also the rdist function in the fields package that may be useful. See here.
rdist
fields
EDIT: Changed ** operator to ^. Thanks, Gavin.
**
^