plot_peaks: Plot a dataset contain defined peaks

Description Usage Arguments Value Examples

View source: R/peak_pick.R

Description

Plot a dataset contain defined peaks

Usage

1
plot_peaks(df, x, y)

Arguments

df

Any dataframe with e.g. a spectrum or similar. It must contain a column 'peak' containing TRUE/FALSE values indicating the presence of peaks.

x

The values plotted on the x-axis (e.g. wavelength)

y

The values plotted on the y-axis (e.g. intensity/counts)

Value

A ggplot

Examples

1
2
3
4
library(tidyverse)
tibble(x1 = seq(0.1, 9, 0.01), y1 = sin(x1)) %>%
  add_peaks(c(148,776)) %>%
  plot_peaks(x1, y1)

SPOMAN/osc documentation built on May 14, 2019, 7:41 a.m.