Learn R Programming

ir (version 0.4.1)

select.ir: Subset columns in ir objects using column names and types

Description

Subset columns in ir objects using column names and types

Usage

select.ir(.data, ...)

Value

.data with the selected columns. If the spectra column is dropped, the ir class is dropped, else the object is of class ir.

Arguments

.data

An object of class ir.

...

<tidy-select> One or more unquoted expressions separated by commas. Variable names can be used as if they were positions in the data frame, so expressions like x:y can be used to select a range of variables.

See Also

Other tidyverse: arrange.ir(), distinct.ir(), extract.ir(), filter-joins, filter.ir(), group_by, mutate, mutate-joins, nest, pivot_longer.ir(), pivot_wider.ir(), rename, rowwise.ir(), separate.ir(), separate_rows.ir(), slice, summarize, unite.ir()

Examples

Run this code
## select
dplyr::select(ir_sample_data, spectra)
dplyr::select(ir_sample_data, holocellulose) # drops ir class


Run the code above in your browser using DataLab