The documentation for the dist function in R has the following words:
distance measurement method to be used. It must be one of the “Euclidean,” “maximum,” “Manhattan,” “Canberra,” “binary,” or “Minkowski.” Any unambiguous substring can be specified.
But I need to calculate the distance based on a custom function that is not in the list, is there any way to specify it? Or are there other ways besides the dist function suitable for my situation?
I know that I can do this in full, but I'm looking for a more accurate way to do this.
Thanks.
Edit:
The distance method I'm using is a correlation measure using pearson distance. Is there any way to do this?
source share