cosine_pairwise: Calculate Cosine Scores Pairwise Takes a grouped tibble of...

View source: R/cosines_pairwise.R

cosine_pairwiseR Documentation

Calculate Cosine Scores Pairwise Takes a grouped tibble of scan data, calculates pairwise cosine similarities

Description

Calculate Cosine Scores Pairwise Takes a grouped tibble of scan data, calculates pairwise cosine similarities

Usage

cosine_pairwise(
  spectra,
  x = "mz",
  thres_cos = 0,
  thres_rt = Inf,
  cores = 1,
  bin
)

Arguments

spectra

Grouped tibble mz/wl and intensity. Should be grouped by scan.

x

Name of x-axis variable (mz or wl, etc.)

thres_cos

Min allowable cosine score for scans to cluster

thres_rt

Max allowable RT difference for scans to cluster

Value

Input tibble but with neighbor and cos columns added

Examples

spectra_clustered <- spectra %>%
  group_by(scan, file) %>%
  cluster_spectra()


octopode/tidychrom documentation built on Nov. 2, 2022, 1:32 a.m.