Skip to contents

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 class 'character'
is_oxide(object)

# S4 method for class 'CompositionMatrix'
is_oxide(object)

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

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

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

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.

Value

A logical vector.

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%.

Note

is_oxide() uses a regular expression (it does not check if elements exist or if stoichiometry is valid).

Author

N. Frerebeau

Examples

## 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)
#>    Sm    Lu     U    Yb    As    Sb    Ca    Na    La    Ce    Th    Cr    Hf 
#>  TRUE FALSE FALSE FALSE  TRUE FALSE  TRUE FALSE  TRUE  TRUE  TRUE  TRUE  TRUE 
#>    Cs    Sc    Rb    Fe    Ta    Co    Eu 
#> FALSE  TRUE  TRUE  TRUE FALSE  TRUE FALSE 
is_element_minor(coda)
#>    Sm    Lu     U    Yb    As    Sb    Ca    Na    La    Ce    Th    Cr    Hf 
#> FALSE FALSE  TRUE  TRUE FALSE  TRUE FALSE  TRUE FALSE FALSE FALSE FALSE FALSE 
#>    Cs    Sc    Rb    Fe    Ta    Co    Eu 
#>  TRUE FALSE FALSE FALSE  TRUE FALSE  TRUE 
is_element_trace(coda)
#>    Sm    Lu     U    Yb    As    Sb    Ca    Na    La    Ce    Th    Cr    Hf 
#> FALSE  TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE 
#>    Cs    Sc    Rb    Fe    Ta    Co    Eu 
#> FALSE FALSE FALSE FALSE FALSE FALSE FALSE 

is_oxide(coda)
#>    Sm    Lu     U    Yb    As    Sb    Ca    Na    La    Ce    Th    Cr    Hf 
#> FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE 
#>    Cs    Sc    Rb    Fe    Ta    Co    Eu 
#> FALSE FALSE FALSE FALSE FALSE FALSE FALSE