add_pick: Add peak indicators at the given indices

Description Usage Arguments Value Examples

Description

Add peak indicators at the given indices

Usage

1
add_pick(data, indices)

Arguments

data

A tibble containing the data to pick peaks in

indices

Indices of the data to mark as peaks

Value

tbl_df with an additional column indicating whether the row is a peak

Examples

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

emiltb/peakr documentation built on May 28, 2019, 8:36 p.m.