Description Usage Arguments Value Examples
'peak_picker()' is an interactive tool (a shinyGadget) for finding peaks in datasets (e.g. a spectrum). After loading the dataset and specifying the columns, you can easily select peaks by clicking on the dataset. The gadget will automatically try to determine the nearest peak to the click and select it. Peaks can be deselected by clicking again.
When you are finished press "Done". The gadget will place a piece of code in your clipboard that you should paste into your script for reproducibility.
1 | peak_picker(df, x, y, find_nearest = TRUE)
|
df |
A tibble containing the data to pick peaks in |
x |
Column containing the x-values |
y |
Column containing the y-values |
find_nearest |
If TRUE (the default) the gadget will attempt to find the nearest peak when clicking on a point in the dataset. This is disabled by setting this option to FALSE, in which case the point nearest to the click will be selected. |
The original dataset with an additional column "peak", which indicates TRUE/FALSE if the given row is a peak.
1 2 3 4 5 6 7 8 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.