Learn R Programming

nexus (version 0.3.0)

chemistry: Chemical Elements and Oxides

Description

Identify oxides and major, minor and traces elements in a compositional data matrix.

Usage

is_element_major(object, ...)

is_element_minor(object, ...)

is_element_trace(object, ...)

is_oxide(object, ...)

# S4 method for character is_oxide(object)

# S4 method for CompositionMatrix is_oxide(object)

# S4 method for CompositionMatrix is_element_major(object, min = 1/100, max = Inf)

# S4 method for CompositionMatrix is_element_minor(object, min = 0.1/100, max = 1/100)

# S4 method for CompositionMatrix is_element_trace(object, min = -Inf, max = 0.1/100)

Value

A logical vector.

Arguments

object

A CompositionMatrix object.

...

Currently not used.

min

A length-one numeric vector specifying the lower bound for element identification.

max

A length-one numeric vector specifying the upper bound for element identification.

Author

N. Frerebeau

Details

There is no definite classification of what are the major, minor and trace elements are. By default, the following rule of thumb is used:

major elements

The major elements are those that define the material under study. Major elements usually have concentrations of above 1%.

minor elements

Minor elements usually have concentrations between 1% and 0.1%

trace elements

Trace elements usually have concentrations of less than 0.1%.

Examples

Run this code
## Data from Day et al. 2011
data("kommos", package = "folio") # Coerce to compositional data
kommos <- remove_NA(kommos, margin = 1) # Remove cases with missing values
coda <- as_composition(kommos, groups = 1) # Use ceramic types for grouping

is_element_major(coda)
is_element_minor(coda)
is_element_trace(coda)

is_oxide(coda)

Run the code above in your browser using DataLab