isogeochem: Tools for Stable Isotope Geochemistry
website·Indexed 30 days ago
https://davidbajnai.github.io/isogeochem/index.htmlAn R package providing tools for stable isotope geochemistry, including functions for calculating isotope fractionation factors, oxygen isotope thermometry, dual clumped isotope thermometry, and conversions between VPDB and VSMOW scales. It includes utilities for error-considering linear regression (york_fit) and access to isotope stratigraphy data such as the Geologic Time Scale 2020.
What's inside isogeochem
- The GNU GPL v3 is a copyleft license designed to guarantee the freedom to share and change software. It ensures that users can distribute copies of the software, receive or obtain the source code, and modify the software for use in new free programs. To maintain these rights, distributors must pass on the same freedoms to recipients, including providing access to the source code and the license terms.
Add additional permissions or terms to a GPLv3 covered work
When adding material to a work covered by the GNU General Public License v3, you may supplement the license with specific 'additional permissions' or terms, provided you are authorized by the copyright holders. Permissible supplemental terms include:
- Differing warranty disclaimers or liability limits.
- Requirements to preserve legal notices or author attributions.
- Prohibitions against misrepresenting the origin of the material or requirements to mark modified versions as different.
- Limits on using the names of licensors or authors for publicity.
- Declining to grant trademark rights for trade names or service marks.
- Requiring indemnification of licensors/authors by those who convey the material with contractual liability assumptions.
Any other non-permissive terms are considered 'further restrictions' and may be removed if the program is governed by this License. If you add terms, you must place a statement of those terms (or a notice of where to find them) in the relevant source files.
Apply GNU GPL v3 to a new software project
To license a new program under the GNU General Public License v3, you must attach specific notices to the start of each source file. Each file should contain at least the copyright line and a pointer to the full license notice. Additionally, for programs with terminal interaction, a short notice should be displayed upon starting in interactive mode.<one line to give the program's name and a brief idea of what it does.> Copyright (C) <year> <name of author> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.Requirements for conveying verbatim copies of GPLv3 source code
To convey verbatim copies of the Program's source code, you must:
- Publish an appropriate copyright notice on each copy.
- Keep all notices intact that state the GPLv3 license (and any section 7 additional terms) apply to the code.
- Keep all notices of the absence of warranty intact.
- Provide all recipients with a copy of the GPLv3 license.
You may charge a fee for each copy or offer support/warranty protection for a fee.
Install and load the isogeochem R package
To use theisogeochempackage for isotope geochemistry calculations, install it from CRAN and load it into your R session.if (!require("isogeochem")) install.packages("isogeochem") library("isogeochem")Example usage of york_fit
This example demonstrates how to perform a York regression with specific x/y values and their corresponding errors.york_fit( x = c(1, 2, 3), y = c(1.1, 1.9, 3.2), x_err = c(0.1, 0.2, 0.1), y_err = c(0.2, 0.1, 0.2) ) # Expected output includes: # $slope: 1.061775 # $slope_se: 0.1599487 # $intercept: -0.05293936 # $intercept_se: 0.3416549 # $w: 0.3412216 0.3175568 0.3412216 # $sigma: 0.1167873 # $R2: 0.9822171 # $pval: 0.09518642Install and load the isogeochem R package
To perform isotope geochemistry calculations, including the Kim and O'Neil (1997) recalculation, install and load theisogeochempackage.if (!require("isogeochem")) install.packages("isogeochem") library("isogeochem")Recalculate calcite δ18O values using updated IUPAC Acid Fractionation Factors
The original Kim and O'Neil (1997) equation used an 18O/16O acid fractionation factor (AFF) of 1.01050 at 25 °C. To update these values to the current IUPAC recommendation (1.010254), you must first convert the calcite δ18O to the δ18O of CO2 produced from acid digestion using the old AFF, and then convert back to calcite δ18O using the new AFF.# Convert d18O_calcite to d18O_CO2acid using the "old" AFF (1.01050) d18O_CO2acid = A_from_a(a = 1.01050, B = d18O_calcite) # Get the current IUPAC recommended AFF for calcite at 25°C AFF_new = a18_CO2acid_c(25, "calcite") # Convert d18O_CO2acid to d18O_calcite using the "new" AFF d18O_calcite_newAFF = B_from_a(a = AFF_new, d18O_CO2acid)Example usage of d17O_c() for carbonate isotope analysis
This example demonstrates how to calculate triple oxygen isotope values for a carbonate grown at 10°C in water with a d18O of -1‰, and how to extract specific values from the resulting data frame.# Calculate d18O, d17O, and D17O values results <- d17O_c(temp = 10, d18O_H2O_VSMOW = -1) print(results) # Output: d18O_c: 32.43637, d17O_c: 16.91669, D17O_c: -0.07931083 # Extract the D17O value specifically d17o_val <- results[, 3] print(d17o_val) # Output: -0.07931083 # Calculate the d'17O value using the prime() function on the d17O column prime(results[, 2]) # Output: 16.7752Provide Installation Information for GPLv3 works in User Products
If you convey object code for use in a 'User Product' (consumer products for personal/household use or items for dwellings) as part of a transfer of possession, you must provide 'Installation Information'.
Installation Information includes methods, procedures, authorization keys, or other data required to install and execute modified versions of a covered work from its Corresponding Source. This ensures that modification is not prevented by technical barriers.
Constraints:
- This is not required if neither you nor any third party retains the ability to install modified object code (e.g., installed in ROM).
- Information must be in a publicly documented format and require no special password or key for unpacking, reading, or copying.
Requirements for conveying non-source (object code) forms of GPLv3 works
You may convey object code provided you also convey the machine-readable Corresponding Source via one of these methods:
- Physical Medium: Accompany the object code with the source on a durable physical medium.
- Written Offer: Accompany the object code with a written offer (valid for at least 3 years) to provide the source via physical medium (at reasonable cost) or network server (free).
- Network Access: Offer the object code via a designated place (gratis or paid) and provide equivalent access to the Corresponding Source at the same place for no further charge.
- Peer-to-Peer: Use P2P transmission, provided you inform peers where the object code and source are offered to the general public for free via the network access method described above.
Requirements for conveying modified versions of GPLv3 source code
When conveying a work based on the Program or modifications to produce it in source code form, you must meet the following conditions:
- Modification Notices: Carry prominent notices stating that the work was modified and provide a relevant date.
- License Notices: Carry prominent notices stating the work is released under the GPLv3 and any conditions added under section 7.
- Whole-Work Licensing: License the entire work, as a whole, under the GPLv3 to anyone who possesses a copy.
- User Interfaces: If the work has interactive user interfaces, each must display Appropriate Legal Notices (unless the original Program's interfaces did not).