\HeaderA{fdist-methods}{Euclidean or Manhattan distance for peak-list comparison}{fdist.Rdash.methods}
\aliasA{fdist,Massvector,Massvector-method}{fdist-methods}{fdist,Massvector,Massvector.Rdash.method}
\aliasA{fdist,Massvectorlist,Massvector-method}{fdist-methods}{fdist,Massvectorlist,Massvector.Rdash.method}
\aliasA{fdist,Massvectorlist,NULL-method}{fdist-methods}{fdist,Massvectorlist,NULL.Rdash.method}
\keyword{methods}{fdist-methods}
\begin{Description}\relax
Computes Euclidean or Manhattan distance for two aligned vectors.
\end{Description}
\begin{Arguments}
\begin{ldescription}
\item[\code{obx}] see above
\item[\code{oby}] see above
\item[\code{error}] measurement error
\item[\code{ppm}] if \code{TRUE} then error in parts per million, in
arbitrary units otherwise
\item[\code{full}] if \code{TRUE} then compute for matching and not matching peaks
\item[\code{weight}] if \code{TRUE} weight differences between matching peaks.
\item[\code{uniq}] if \code{TRUE} compute non-crossing matching
\item[\code{method}] type of dissimilarity:
\Itemize{
\item euclidean -- euclidean distance  (\code{\LinkA{dist}{dist}})
\item manhattan -- manhattan distance. (\code{\LinkA{dist}{dist}})
\item canberra -- canberra distance. (\code{\LinkA{dist}{dist}})
\item simindex -- similarity index. 
}

\item[\code{norm}] how to scale the itensities:
\Itemize{
\item vnorm -- l=2 norm, vector length normalization.
\item tic -- l=1 norm, total ion count normalization.
\item student -- root mean square normalization (see. \code{\LinkA{scale}{scale}}) 
\item zscore -- z-score normalization. (see. \code{\LinkA{scale}{scale}}) 
}

\item[\code{theta}] "numeric" how to weight the non-matching peaks.
\item[\code{N}] default 0 - total length of alinged peak-lists.
\item[\code{range}] experimental
\end{ldescription}
\end{Arguments}
\begin{Section}{Methods}
\describe{
\item[obx = "Massvector", oby = "Massvector"] :
\item[obx = "Massvectorlist", oby = "Massvector"] :
\item[obx = "Massvectorlist", oby = "NULL"] :
}
\end{Section}
\begin{Author}\relax
Witold E. Wolski \email{witek96@users.sourceforge.net}
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{fcor-methods}{fcor.Rdash.methods}},\code{\LinkA{fbinary-methods}{fbinary.Rdash.methods}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
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"))
\end{ExampleCode}
\end{Examples}

