Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

fast_sim

Function to compute similarity measures between a vector and each row of a matrix.


Description

This function allows computing a similarity measure between a vector and each row of a matrix. The similarity measure is defined by d^2 where d is the Euclidean distance between the vector and each row. It is implemented thanks to the RCpp package.

Usage

fast_sim(prot, mat)

Arguments

prot

A numeric vector containing numeric and missing values.

mat

A data matrix containing numeric and missing values.

Value

A numeric vector containing the values of the similarity measures between the prot vector and each row of the mat matrix.

Author(s)

Quentin Giai Gianetto <quentin2g@yahoo.fr>

Examples

#Simulating data
res.sim=sim.data(nb.pept=20000,nb.miss=1000);

#Fast computation of similarities
fast_sim(res.sim$dat.obs[1,],res.sim$dat.obs);

imp4p

Imputation for Proteomics

v1.1
GPL-3
Authors
Quentin Giai Gianetto
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.