\name{calculateSimilarity} \alias{calculateSimilarity} \title{Calculate similarities (distances) between a vector and the rows (columns) of a matrix} \description{ \code{calculateSimilarity} calculates the similarity (distance) between the submitted numeric vector and all rows respectively columns of a numerical matrix using the specified similarity (distance) measurement method. } \usage{ calculateSimilarity(vector,matrix,orientation="h",distance.fun=distance.euclidian,include.values=FALSE) } \arguments{ \item{vector}{The numerical vector for which the similarities should be calculated.} \item{matrix}{Numerical matrix. Similarities are calculated for the input vector (\code{vector} parameter) with all rows (or columns, depending on the \code{orientation} parameter) of this matrix.} \item{orientation}{If the vector should be compared with the rows (\code{"h"}) or columns (\code{"v"}) of the matrix.} \item{distance.fun}{Function to calculate the similarity.} \item{include.values}{Include input values in the result. If FALSE only a vector with the distances will be returned.} } \details{ This function is a simple and quick way to calculate similarities of a numerical vector and the columns (or rows) of a numerical matrix. \code{calculateSimilarity} can be used for example to search for genes with a common (similar) expression or regulation pattern than a input gene. } \references{} \author{Johannes Rainer} \seealso{ \code{\link{distance.pearson}} \code{\link{distance.euclidian}} \code{\link{distance.spearman}} \code{\link{dbSearchSimilarPattern}} } \examples{ In <- runif(5) Testset <- rbind(a=runif(5,min=-1,max=2),b=runif(5,min=0,max=2),c=runif(5)) In Testset calculateSimilarity(vector=In,matrix=Testset,orientation="h") } \keyword{data}