clusters <- readRDS(system.file("clusters_tibble.RDS", package = "maldipickr"))
# Simulate OD600 values with uniform distribution
# for each of the colonies we measured with
# the Bruker MALDI Biotyper
set.seed(104)
metadata <- dplyr::transmute(clusters, name = name, OD600 = runif(n = nrow(clusters)))
# Pick the spectra based on the highest OD600 value per cluster
pick_spectra(clusters, metadata, "OD600")
from the example of the picking function:
gives correctly:
However, when the provided metadata cannot be merged,there is no warning but NA in the column: