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 ID's 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 ID's 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")

benmbutler/powdR documentation built on Sept. 16, 2020, 5:03 a.m.