subset.powdRlib: Subset a powdRlib object

Description Usage Arguments Value Examples

View source: R/subset.R

Description

subset.powdRlib is designed to provide an easy way of subsetting a powdRlib object by defining the phase ID's that the user wishes to either keep or remove.

Usage

1
2
## S3 method for class 'powdRlib'
subset(x, refs, mode, ...)

Arguments

x

a powdRlib object.

refs

a string of the phase IDs or names of reference patterns to be subset. The ID's or names supplied must be present within the lib$phases$phase_id or lib$phases$phase_name columns.

mode

denotes whether the phase IDs or names defined in the refs argument are retained ("keep") or removed ("remove").

...

other arguments

Value

A powdRlib object.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
#Load the minerals library
data(minerals)

minerals_keep <- subset(minerals,
                        refs = c("QUA.1", "QUA.2"),
                        mode = "keep")

minerals_remove <- subset(minerals,
                          refs = c("QUA.1", "QUA.2"),
                          mode = "remove")

powdR documentation built on Aug. 13, 2021, 5:08 p.m.