View source: R/nmr_peak_clustering.R
nmr_build_peak_table | R Documentation |
Build a peak table from the clustered peak list
nmr_build_peak_table(peak_data, dataset = NULL)
peak_data |
A peak list, with the cluster column |
dataset |
A nmr_dataset_1D object, to get the metadata |
An nmr_dataset_peak_table, containing the peak table and the annotations
peak_data <- data.frame(
NMRExperiment = c("10", "10", "20", "20"),
peak_id = paste0("Peak", 1:4),
ppm = c(1, 2, 1.1, 2.1),
area = c(10, 20, 12, 22)
)
clustering_result <- nmr_peak_clustering(peak_data, num_clusters = 2)
peak_data <- clustering_result$peak_data
peak_table <- nmr_build_peak_table(peak_data)
stopifnot(ncol(peak_table) == 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.