Learn R Programming

tidyspec (version 0.1.0)

spec_filter: Filter spectral data by wavenumber range

Description

This function filters the spectral dataset based on a specified wavenumber (`wn`) range. It requires the wavenumber column to be previously set using [set_spec_wn()]. If `wn_min` and/or `wn_max` are provided, the data will be filtered accordingly. If neither is provided, the original dataset is returned unchanged.

Usage

spec_filter(.data, wn_min = NULL, wn_max = NULL)

Value

A filtered data frame based on the wavenumber column.

Arguments

.data

A data frame containing spectral data.

wn_min

Optional numeric value. Minimum wavenumber value to keep.

wn_max

Optional numeric value. Maximum wavenumber value to keep.

Examples

Run this code
set_spec_wn("Wavenumber")
spec_filter(CoHAspec, wn_min = 500, wn_max = 1800)

Run the code above in your browser using DataLab