fdist-methods {msbase} | R Documentation

## Euclidean or Manhattan distance for peak-list comparison

### Description

Computes Euclidean or Manhattan distance for two aligned vectors.

### Arguments

`obx` | see above
`oby` | see above
`error` | measurement error
`ppm` | if `TRUE` then error in parts per million, in arbitrary units otherwise
`full` | if `TRUE` then compute for matching and not matching peaks
`weight` | if `TRUE` weight differences between matching peaks.
`uniq` | if `TRUE` compute non-crossing matching
`method` | type of dissimilarity: euclidean – euclidean distance (`dist`) manhattan – manhattan distance. (`dist`) canberra – canberra distance. (`dist`) simindex – similarity index.
`norm` | how to scale the itensities: vnorm – l=2 norm, vector length normalization. tic – l=1 norm, total ion count normalization. student – root mean square normalization (see. `scale`) zscore – z-score normalization. (see. `scale`)
`theta` | "numeric" how to weight the non-matching peaks.
`N` | default 0 - total length of alinged peak-lists.
`range` | experimental

### Methods

obx = "Massvector", oby = "Massvector"
  :
obx = "Massvectorlist", oby = "Massvector"
  :
obx = "Massvectorlist", oby = "NULL"
  :

### Author(s)

Witold E. Wolski witek96@users.sourceforge.net

### See Also

`fcor-methods`,`fbinary-methods`

### Examples

    data(pldata)
    fdist(pldata[[1]],pldata[[2]],error=400,ppm=TRUE,theta=1,weight=FALSE,scale="zscore",method="euclidean")
    fdist(pldata[[1]],pldata[[2]],error=400,ppm=TRUE,theta=1,weight=FALSE,scale="no",method="manhattan")
    tmp <- fdist(pldata,NULL,error=400,ppm=TRUE,theta=1,weight=FALSE,scale="student",method="euclidean")
    plot(hclust(tmp,method="average"))

[Package msbase version 1.5.0 Index]