Package 'imputeREE'

Title: Impute Missing Rare Earth Element Data in Zircon
Description: Set of functions to impute missing rare earth data, calculate La and Pr concentrations and Ce anomalies in zircons based on the Chondrite-Onuma and Chondrite-Lattice of Carrasco-Godoy and Campbell (2023) <doi:10.1007/s00410-023-02025-9> and the Logarithmic regression from Zhong et al. (2019) <doi:10.1007/s00710-019-00682-y>.
Authors: Carlos Carrasco Godoy [aut, cre]
Maintainer: Carlos Carrasco Godoy <[email protected]>
License: MIT + file LICENSE
Version: 0.0.5
Built: 2024-08-27 04:36:52 UTC
Source: https://github.com/cicarrascog/imputeree

Help Index


Add ionic radius and chondrite and mantle values, Z and Mass

Description

This is a helper function to work with Element_norm() and Element_denorm(). Add Ionic Radius to data and chondrite values. For now, only supports 3+ in eight-fold coordination for REE, Zr and Y.Values are from Shannon(1976), McDonough and Sun (1995) and Palme and O'Neill (2014).

Usage

add_element_data(dat)

Arguments

dat

Long data REE format

Value

A data frame


Add_ID

Description

Add an unique ID per observation and checks that is not overwriting an existing column. If the column already exist, it will take no action. This is a wrapper of tibble::rowid_to_column() that checks that not columns is overwritten.

Usage

add_ID(dat, ID = "rowid")

Arguments

dat

a tibble or a dataframe

ID

Name of column to use for rownames. 'rowid' is used if none is specified. er parameters passed onto the tibble::rowid_to_column() function

Value

a data frame


Add Chondrite or Mantle values for normalization.

Description

This is a helper function to work with Element_norm() and Element_denorm(). Takes long pivoted data to match element name and add normalizing values from the Element_data dataset.

Usage

add_IonicRadii(dat, method = ShannonRadiiVIII_Coord_3plus)

Arguments

dat

a dataframe or tibble.

method

Ionic Radii from Shannon, 1976

Value

a data frame or tibble


Add Chondrite or Mantle values for normalization.

Description

This is a helper function to work with Element_norm() and Element_denorm(). Takes long pivoted data to match element name and add normalizing values from the Element_data dataset.

Usage

add_NormValues(dat, chondrite = PalmeOneill2014CI)

Arguments

dat

Dataframe or tibble. doc

chondrite

PalmeOneill2014CI, Oneill2014Mantle, McDonough1995CI

Value

a data frame or tibble


Zircon Rare earth Element Data from Ballard et al. 2001 and 2002.

Description

Trace element data from selected zircons from the data of Ballard et al. 2001 and 2002.

Usage

Ballard_et_al_Zircon

Format

A data frame with 210 rows and 18 variables:

Reference

Reference of the data

Deposit

Deposit associated with the data

Zr_Y_ppm

Y concentrations in ppm

Zr_P_ppm

P concentrations in ppm

Zr_La_ppm

La concentrations in ppm

Zr_Ce_ppm

Ce concentrations in ppm

Zr_Pr_ppm

Pr concentrations in ppm

Zr_Nd_ppm

Nd concentrations in ppm

Zr_Sm_ppm

Sm concentrations in ppm

Zr_Eu_ppm

Eu concentrations in ppm

Zr_Gd_ppm

Gd concentrations in ppm

Zr_Tb_ppm

Tb concentrations in ppm

Zr_Dy_ppm

Dy concentrations in ppm

Zr_Ho_ppm

Ho concentrations in ppm

Zr_Er_ppm

Er concentrations in ppm

Zr_Tm_ppm

Tm concentrations in ppm

Zr_Yb_ppm

Yb concentrations in ppm

Zr_Lu_ppm

Lu concentrations in ppm

Source

Ballard, J. R., Palin, J. M., Williams, I. S., Campbell, I. H., and Faunes, A., 2001, Two ages of porphyry intrusion resolved for the super-giant Chuquicamata copper deposit of northern Chile by ELA-ICP-MS and SHRIMP: Geology, v. 29, p. 383–386. (https://pubs.geoscienceworld.org/gsa/geology/article-abstract/29/5/383/192017/Two-ages-of-porphyry-intrusion-resolved-for-the?redirectedFrom=fulltext)

Ballard, J. R., Palin, M. J., and Campbell, I. H., 2002, Relative oxidation states of magmas inferred from Ce(IV)/Ce(III) in zircon: application to porphyry copper deposits of northern Chile: Contributions to Mineralogy and Petrology, v. 144, p. 347–364. (https://link.springer.com/article/10.1007/s00410-002-0402-5)


Calculate and Impute REE missing data and anomalies.

Description

This is a wrapper for data %>% model_REE() %>% impute_REE() %>% add_parameters()

Usage

calc_all(dat, prefix = NULL, suffix = NULL, chondrite = PalmeOneill2014CI)

Arguments

dat

A data frame with REE data in ppm

prefix

A prefix in your columns e.g. ICP_La

suffix

A suffix in your columns e.g. La_ppm

chondrite

an option from: PalmeOneill2014CI, Oneill2014Mantle, McDonough1995CI

Value

A data frame. Includes imputed REE, model metrics, and calculated variables.

Examples

Ballard_et_al_Zircon %>% calc_all(prefix = 'Zr_', suffix = '_ppm')

Clean variable names that have prefixes or suffixes

Description

This is a helper function

Usage

CleanColnames(dat, prefix = NULL, suffix = NULL)

Arguments

dat

a data frame

prefix

A character of length 1

suffix

A character of length 1

Value

A data frame


Corrects for the model deviations of Er, Yb, Lu and Y

Description

Calculated value of Yb, Lu and Y slightly deviates from the linear regression. This function apply a correction to compensates those deviations. This function is wrapped inside model_REE()

Usage

correct_heavy(
  dat,
  Y_correction_fact = 1/0.72,
  Ho_correction_fact = 1,
  Er_correction_fact = 1/0.974,
  Tm_correction_fact = 1,
  Yb_correction_fact = 1/0.907,
  Lu_correction_fact = 1/0.926
)

Arguments

dat

A dataframe

Y_correction_fact

a number: correction factor for underestimated Y. 1/ 0.72 by default.

Ho_correction_fact

a number: correction factor for Ho. 1 by default.

Er_correction_fact

a number: correction factor for underestimated Er. 1/0.974 by default.

Tm_correction_fact

a number: correction factor for Tm. 1 by default.

Yb_correction_fact

a number: correction factor for underestimated Yb. 1/0.907 by default.

Lu_correction_fact

a number: correction factor for underestimated Lu. 1/0.926 by default.

Value

a data frame


Corrects for the model deviations of Yb, Lu and Y

Description

Calculated value of Yb, Lu and Y slightly deviates from the linear regression. This function apply a correction to compensates those deviations. This function is wrapped inside model_REE()

Usage

correct_middle(
  dat,
  Nd_correction_fact = 1/0.989,
  Sm_correction_fact = 1/1.022,
  Gd_correction_fact = 1/1.033,
  Tb_correction_fact = 1/1.05,
  Dy_correction_fact = 1/1.032,
  Pr_correction_fact = 1/0.918
)

Arguments

dat

A dataframe

Nd_correction_fact

a number: correction factor for underestimated Nd 1/0.0.989

Sm_correction_fact

a number: correction factor for overestimated Sm 1/1.022

Gd_correction_fact

a number: correction factor for overestimated Gd 1/1.033

Tb_correction_fact

a number: correction factor for overestimated Tb 1/1.050

Dy_correction_fact

a number: correction factor for overestimated Dy 1/1.032

Pr_correction_fact

a number: correction factor for overestimated Pr 1/0.918

Value

a data frame


Element data for calculations

Description

A dataset containing CI and Mantle values for normalization for selected elements. The data used is from IUPAC, Palme and O'Neill (2014), and McDonough and Sun (1995). Ionic Radii are from Shannon (1976).

Usage

Element_Data

Format

A data frame with 77 rows and 11 variables:

Z

Atomic Number

Element_name

Element Symbol

Atomic_Mass

Atomic Mass from IUPAC

Unit

Measure Unit of the Concentrations, ppm = parts per million, pct = percentage

PalmeOneill2014CI

Chondrite values from Palme and Oneil (2014)

PalmeOneill2014CI_RSD

Uncertainty from chondrite values from Palme and O'Neill (2014) as RSD (Relative standard Deviation)

PalmeOneill2014Mantle

Primitive Mantle values from Palme and O'Neill (2014)

PalmeOneill2014Mantle_RSD

Uncertainty from Primitive Mantle Values from Palme and O'Neill (2014) as RSD (Relative standard Deviation)

McDonough1995CI

Chondrite values from McDonough and Sun (1995)

ShannonRadiiVIII_Coord_3plus

Shannon (1976) Ionic Radii for elements in Eight-fold coordination and 3+ charge

Z_Zhong

numbers assigned by Zhong et al. (2019) for a logarithmic regression to calculate Zircon REE.

...

Source

IUPAC Website (https://iupac.org/)

Palme, H., and O’Neill, H. St. C., 2014, 3.1 - Cosmochemical Estimates of Mantle Composition, in Holland, H. D. and Turekian, K. K. eds., Treatise on Geochemistry (Second Edition): Oxford, Elsevier, p. 1-39.(doi:10.1016/B978-0-08-095975-7.00201-1)

McDonough, W. F., and Sun, S. -s., 1995, The composition of the Earth: Chemical Geology, v. 120, p. 223-253.(doi:10.1016/0009-2541(94)00140-4)

Shannon, R. D., 1976, Revised effective ionic radii and systematic studies of interatomic distances in halides and chalcogenides: Acta Crystallographica Section A, v. 32, p. 751-767. doi:10.1107/S0567739476001551

Shannon, R. D., 1976, Revised effective ionic radii and systematic studies of interatomic distances in halides and chalcogenides: Acta Crystallographica Section A, v. 32, p. 751-767. doi:10.1107/S0567739476001551

Zhong, S., Seltmann, R., Qu, H., and Song, Y., 2019, Characterization of the zircon Ce anomaly for estimation of oxidation state of magmas: a revised Ce/Ce* method: Mineralogy and Petrology, v. 113, no. 6, p. 755–763. doi:10.1007/s00710-019-00682-y


Denormalize chrodrite Normalize to ppm

Description

Denormalize chrodrite Normalize to ppm

Usage

element_denorm(dat, method = PalmeOneill2014CI)

Arguments

dat

A dataframe

method

an option from: 'PalmeOneill2014CI', 'Oneill2014Mantle', 'McDonough1995CI'

Value

A dataframe


Calculate normalized values for a list of elements

Description

Element norm normalize values according to published values for the Primitive mantle and chondrites. By defect, it uses the values from Palme and O'Neill (2014). By default, REE + Y list is provided

Usage

Element_norm(
  data,
  return = "rect",
  chondrite = PalmeOneill2014CI,
  prefix = NULL,
  suffix = NULL,
  Element_list = REE_plus_Y_Elements
)

Arguments

data

a data frame

return

a character from: "rect" for a wide data return,"raw" for a long data return,"append" to append the results to the input data

chondrite

an option from: PalmeOneill2014CI, Oneill2014Mantle, McDonough1995CI

prefix

A prefix in your columns e.g. ICP_La

suffix

A suffix in your columns e.g. La_ppm

Element_list

a character vector: indicating the elements that should be normalized. REE + Y by default

Value

a data frame


Impute Rare earth elements

Description

Imputes missing REE after modelling. Expect the output of 'model_REE()' function. Only missing values are replaced.

Usage

impute_REE(data, prefix = NULL, suffix = NULL, rsquared = 0.95)

Arguments

data

A dataframe resulting from 'model_ree()'

prefix

A prefix in your columns e.g. ICP_La

suffix

A suffix in your columns e.g. La_ppm

rsquared

A numerical value between 0 and 1. Tolerance to mis-fitting models. set as 0.9 by default.

Details

By default, exclude models with R-squared lower than 0.95. This limit is flexible and method dependent. As guidelines, the Chondrite-Lattice mthod should consider R-squared > 0.95 for at least 3 points. The Chondrite-Onuma method should consider R-squared >0.98 for at least 4 points.

Value

A dataframe

Examples

Ballard_et_al_Zircon %>%
dplyr::slice(1:100) %>%
model_REE(prefix = 'Zr', suffix = 'ppm') %>%
impute_REE(prefix = 'Zr', suffix = 'ppm')

Model REE + Y contents using different methods.

Description

This function models REE + Y using different methods. The Chondrite-Lattice method use a linear regression between the REE (+Y) chondrite-normalized and the missfit term from the lattice strain equation (ri/3 + r0/6)(ri-r0)^2. The Chondrite-Onuma method use the quadratic relationship between the ionic radii and chondrite normalized REE values. The method of Zhong et al. (2019) use a logaritmic relationship between the atomic number of the REE and the chondrite normalized REE. For details in the lattice strain theory, see Blundy and Wood 1994. For more details in the imputation methods see Carrasco-Godoy and Campbell (2023), and Zhong et al. (2019)

Usage

model_REE(
  dat,
  method = 1,
  long_format = F,
  exclude = c("La", "Pr", "Ce", "Eu", "Y"),
  r0 = 0.84,
  chondrite = PalmeOneill2014CI,
  estimate_r0 = FALSE,
  r0_step = 0.01,
  r0_min = 0.01,
  r0_max = 0.15,
  prefix = NULL,
  suffix = NULL,
  Calibrate = T,
  Pr_correction_fact = 1/0.918,
  Y_correction_fact = 1/0.72,
  Dy_correction_fact = 1/1.032,
  Ho_correction_fact = 1,
  Er_correction_fact = 1/0.974,
  Tm_correction_fact = 1,
  Yb_correction_fact = 1/0.8785,
  Lu_correction_fact = 1/0.8943,
  Nd_correction_fact = 1/0.989,
  Sm_correction_fact = 1/1.022,
  Gd_correction_fact = 1/1.033,
  Tb_correction_fact = 1/1.05
)

Arguments

dat

A data frame with REE data in ppm

method

a number. a choice of 1 for Chondrite Lattice or 2 for Zhong et al. (2019) or 3 for Chondrite-Onuma method.

long_format

If T, rectangular long data is returned.

exclude

a string: vector including elements that should be omitted from modelling. La, Ce and Eu are the default. Ce and Eu should be always included

r0

A number: ionic radii of the lattice site r0. By default is 0.87 A, the median value obtained by Carrasco-Godoy and Campbell.

chondrite

an option from: PalmeOneill2014CI, Oneill2014Mantle, McDonough1995CI

estimate_r0

If T, r0 is estimated using a method similar to the one from Loader et al. 2022.

r0_step

If r0 is estimated, this define the step for iteration. smaller step heavily increases the computing time.

r0_min

Minimun value from which the iteration starts. Calculated from r0.

r0_max

Maximun value at which iteration ends. Calculated from r0.

prefix

A prefix in your columns e.g. ICP_La

suffix

A suffix in your columns e.g. La_ppm

Calibrate

Logical (T or F). If True, the model is calibrated using the correction factors. By default it is the reciprocal of the median REE from the work of Carrasco-Godoy and Campbell is used.

Pr_correction_fact

a number: correction factor for overestimated Pr 1/0.918

Y_correction_fact

a number: correction factor for underestimated Y. 1/ 0.72 by default.

Dy_correction_fact

a number: correction factor for overestimated Dy 1/1.032

Ho_correction_fact

a number: correction factor for Ho. 1 by default.

Er_correction_fact

a number: correction factor for underestimated Er. 1/0.97 by default.

Tm_correction_fact

a number: correction factor for Tm. 1 by default.

Yb_correction_fact

a number: correction factor for underestimated Yb. 1/0.8785 by default.

Lu_correction_fact

a number: correction factor for underestimated Lu. 1/0.8943 by default.

Nd_correction_fact

a number: correction factor for underestimated Nd 1/0.0.989

Sm_correction_fact

a number: correction factor for overestimated Sm 1/1.022

Gd_correction_fact

a number: correction factor for overestimated Gd 1/1.033

Tb_correction_fact

a number: correction factor for overestimated Tb 1/1.050

Value

a dataframe

See Also

Other model REE: modelChondrite_Onuma(), modelChondrite_lattice(), modelZhong()

Examples

Ballard_et_al_Zircon %>%  model_REE(prefix = 'Zr', suffix = 'ppm')

Model REE contents using the Chondrite-Lattice method of Carrasco-Godoy and Campbell (2023)

Description

This function apply the Chondrite-Lattice method which is a linear regression between the misfit parameter from the lattice strain equation and the logarithm of their chondrite normalized values. At least 2 points are required to use this method. This method is based on the work of Blundy and Wood (1994) but using chondrite normalized values as noted by Carrasco-Godoy and Campbell (2023). Refer to Carrasco-Godoy and Campbell (2023) for details.

Usage

modelChondrite_lattice(
  dat,
  exclude = c("La", "Pr", "Ce", "Eu", "Y"),
  Calibrate = T,
  prefix = NULL,
  suffix = NULL,
  r0 = 0.87,
  chondrite = PalmeOneill2014CI,
  Pr_correction_fact = 1/0.918,
  Y_correction_fact = 1/0.72,
  Dy_correction_fact = 1/1.032,
  Ho_correction_fact = 1,
  Er_correction_fact = 1/0.974,
  Tm_correction_fact = 1,
  Yb_correction_fact = 1/0.8785,
  Lu_correction_fact = 1/0.8943,
  Nd_correction_fact = 1/0.989,
  Sm_correction_fact = 1/1.022,
  Gd_correction_fact = 1/1.033,
  Tb_correction_fact = 1/1.05
)

Arguments

dat

A data frame with REE data in ppm

exclude

a string: vector including elements that should be omitted from modelling. La, Ce and Eu are the default. Ce and Eu should be always included

Calibrate

Logical (T or F). If True, the model is calibrated using the correction factors. By default it is the reciprocal of the median REE from the work of Carrasco-Godoy and Campbell is used.

prefix

A prefix in your columns e.g. ICP_La

suffix

A suffix in your columns e.g. La_ppm

r0

A number: ionic radii of the lattice site r0. By default is 0.87 A, the median value obtained by Carrasco-Godoy and Campbell.

chondrite

an option from: PalmeOneill2014CI, Oneill2014Mantle, McDonough1995CI

Pr_correction_fact

a number: correction factor for overestimated Pr 1/0.918

Y_correction_fact

a number: correction factor for underestimated Y. 1/ 0.72 by default.

Dy_correction_fact

a number: correction factor for overestimated Dy 1/1.032

Ho_correction_fact

a number: correction factor for Ho. 1 by default.

Er_correction_fact

a number: correction factor for underestimated Er. 1/0.97 by default.

Tm_correction_fact

a number: correction factor for Tm. 1 by default.

Yb_correction_fact

a number: correction factor for underestimated Yb. 1/0.8785 by default.

Lu_correction_fact

a number: correction factor for underestimated Lu. 1/0.8943 by default.

Nd_correction_fact

a number: correction factor for underestimated Nd 1/0.0.989

Sm_correction_fact

a number: correction factor for overestimated Sm 1/1.022

Gd_correction_fact

a number: correction factor for overestimated Gd 1/1.033

Tb_correction_fact

a number: correction factor for overestimated Tb 1/1.050

Value

a dataframe

See Also

Other model REE: modelChondrite_Onuma(), modelZhong(), model_REE()

Examples

Ballard_et_al_Zircon %>%  modelChondrite_lattice(prefix = 'Zr', suffix = 'ppm')

Model REE contents using the Chondrite-Onuma method of Carrasco-Godoy and Campbell (2023)

Description

This function apply the Chondrite-Onuma method which is a quadratic regression between the ionic radius of the REE and the logarithm of their chondrite normalized values. At least 3 non-linear points are required to use this method. This method is based on the work of Onuma et al. (1968) but using chondrite normalized values as noted by Carrasco-Godoy and Campbell (2023). Refer to Carrasco-Godoy and Campbell (2023) for details.

Usage

modelChondrite_Onuma(
  dat,
  exclude = c("La", "Pr", "Ce", "Eu", "Y"),
  Calibrate = T,
  chondrite = PalmeOneill2014CI,
  prefix = NULL,
  suffix = NULL,
  Pr_correction_fact = 1/1,
  Nd_correction_fact = 1/1.026486418,
  Sm_correction_fact = 1/0.971111041,
  Gd_correction_fact = 1/0.95928241,
  Tb_correction_fact = 1/1.000985745,
  Dy_correction_fact = 1/1.030049321,
  Ho_correction_fact = 1/1.018711009,
  Er_correction_fact = 1/0.996610693,
  Tm_correction_fact = 1/1.053205463,
  Yb_correction_fact = 1/0.982656111,
  Lu_correction_fact = 1/0.952608321,
  Y_correction_fact = 1/0.665380561
)

Arguments

dat

A data frame with REE data in ppm

exclude

a string: vector including elements that should be omitted from modelling. La, Ce and Eu are the default. Ce and Eu should be always included

Calibrate

Logical (T or F). If True, the model is calibrated using the correction factors. By default it is the reciprocal of the median REE from the work of Carrasco-Godoy and Campbell is used.

chondrite

an option from: PalmeOneill2014CI, Oneill2014Mantle, McDonough1995CI

prefix

A prefix in your columns e.g. ICP_La

suffix

A suffix in your columns e.g. La_ppm

Pr_correction_fact

a number: correction factor for overestimated Pr 1/0.918

Nd_correction_fact

a number: correction factor for underestimated Nd 1/0.0.989

Sm_correction_fact

a number: correction factor for overestimated Sm 1/1.022

Gd_correction_fact

a number: correction factor for overestimated Gd 1/1.033

Tb_correction_fact

a number: correction factor for overestimated Tb 1/1.050

Dy_correction_fact

a number: correction factor for overestimated Dy 1/1.032

Ho_correction_fact

a number: correction factor for Ho. 1 by default.

Er_correction_fact

a number: correction factor for underestimated Er. 1/0.97 by default.

Tm_correction_fact

a number: correction factor for Tm. 1 by default.

Yb_correction_fact

a number: correction factor for underestimated Yb. 1/0.8785 by default.

Lu_correction_fact

a number: correction factor for underestimated Lu. 1/0.8943 by default.

Y_correction_fact

a number: correction factor for underestimated Y. 1/ 0.72 by default.

Value

a dataframe

See Also

Other model REE: modelChondrite_lattice(), modelZhong(), model_REE()

Examples

Ballard_et_al_Zircon %>%  modelChondrite_Onuma(prefix = 'Zr', suffix = 'ppm')

Model REE contents using the method of Zhong et al. (2019)

Description

This function apply the logarithmic regression using the method of Zhong et al. (2019). This method considers the relationship between the logarithm of the REE atomic number vs their chondrite normalized values. For more information refer to the Zhong et al. (2019) and Carrasco-Godoy and Campbell (2023) for a discussion of its limitations to calculate La or Ce*.

Usage

modelZhong(
  dat,
  exclude = c("La", "Pr", "Ce", "Eu", "Y"),
  Calibrate = F,
  chondrite = PalmeOneill2014CI,
  prefix = NULL,
  suffix = NULL
)

Arguments

dat

A data frame with REE data in ppm

exclude

a string: vector including elements that should be omitted from modelling. La, Ce and Eu are the default. Ce and Eu should be always included

Calibrate

Logical (T or F). If True, the model is calibrated using the correction factors. By default it is the reciprocal of the median REE from the work of Carrasco-Godoy and Campbell is used.

chondrite

an option from: PalmeOneill2014CI, Oneill2014Mantle, McDonough1995CI

prefix

A prefix in your columns e.g. ICP_La

suffix

A suffix in your columns e.g. La_ppm

Value

a dataframe

See Also

Other model REE: modelChondrite_Onuma(), modelChondrite_lattice(), model_REE()

Examples

Ballard_et_al_Zircon %>%  modelZhong(prefix = 'Zr', suffix = 'ppm')

Rare earth element list

Description

A string vector containing the elemental symbols for REE.

Usage

REE_Elements

Format

Rare earth element list


Rare earth element list

Description

A string vector containing the elemental symbols for REE and Y.

Usage

REE_plus_Y_Elements

Format

Rare earth element + Y list