Skip to content

Commit

Permalink
First CRAN realease candidate
Browse files Browse the repository at this point in the history
  • Loading branch information
abuseki committed Dec 26, 2023
1 parent a9d1982 commit ac71f3e
Show file tree
Hide file tree
Showing 15 changed files with 71 additions and 34 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
^README\.Rmd$
^\.github$
^checks$
^cran-comments\.md$
18 changes: 9 additions & 9 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
Package: georefdatar
Title: Geosciences Reference Data Sets in R
Version: 0.6.2.9000
Title: Geosciences Reference Datasets in R
Version: 0.6.4
Authors@R:
person("Gerald", "Schuberth-Hlavač", email= "[email protected]",
role = c("aut", "cre"))
Description: The package includes reference data sets commonly used in
geosciences, such as the standard atomic weights of elements, a periodic
table, a mineral list, reservoir reference datasets (continental crust,
mantle, basalts, etc.), decay constants, and isotopic ratios frequently used
in geochronology. Additionally, the package provides functions for basic
queries of atomic weights and mineral lists. All datasets have complete
references, making them citable.
Description: Reference datasets commonly used in geosciences. Such as the
standard atomic weights of elements, a periodic table, a mineral list and
their abbreviations, reservoir reference datasets (continental crust, mantle,
basalts, etc.), decay constants and isotopic ratios frequently used in
geochronology. Additionally, the package provides functions for basic queries
of atomic weights and the mineral list. All datasets have complete references,
making them citable.
License: MIT + file LICENSE
URL: https://github.com/abuseki/georefdatar
BugReports: https://github.com/abuseki/georefdatar/issues
Expand Down
4 changes: 2 additions & 2 deletions R/IUPAC__Standard_atomic_weights_of_the_elements.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#'
#' A data set containing the standard atomic weights of the elements as
#' recommended by the [International Union of Pure and Applied Chemistry
#' (IUPAC)](https://www.iupac.org) and [Commission on Isotopic Abundances and
#' (IUPAC)](https://iupac.org) and [Commission on Isotopic Abundances and
#' Atomic Weights (CIAAW)](https://www.ciaaw.org).
#'
#' This is table 1 of \insertCite{Prohaska2022}{georefdatar}. The (foot)notes in
Expand All @@ -24,7 +24,7 @@
#' figures. Unless such precision cannot be attained due to the variability of
#' isotopic composition in normal materials or due to the limitations of the
#' measurement capability.}
#' \item{abrStdAW::±}{A +/− value as a simplified measure of the reliability of
#' \item{abrStdAW::±}{A plus-minus-value as a simplified measure of the reliability of
#' the abridged values.}
#' \item{Note}{The collected footnotes of the table. Notes are resolved to the
#' sentences associated with them. If there is more than one note, the notes are
Expand Down
24 changes: 17 additions & 7 deletions R/Minerals.R
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@
#' List of Minerals
#'
#' IMA approved list of minerals. Retrieved from _RRUFF_ \insertCite{Lafuente_2015;textual}{georefdatar}.
#'
#' @format A data frame with `r nrow(mins)` minerals and their names, symbols and chemistry.\cr
#' [International Mineralogical Association (IMA)](https://mineralogy-ima.org/)
#' Commission on New Minerals, Nomenclature and Classification (CNMNC)
#' approved list of minerals, names and abbreviations
#' \insertCite{Warr_2021}{georefdatar}.\cr
#' Retrieved from [RRUFF](https://rruff.info/)
#' \insertCite{Lafuente_2015}{georefdatar}.
#'
#' @format A data frame with `r nrow(mins)` minerals and their names, symbols
#' (abbreviations) and chemistry.\cr
#' `r paste(names(mins), collapse= ', ')`
#'
#' @seealso
#' [IMA approved minerals on RRUFF](https://rruff.info/ima/)
#'
#' [IMA–CNMNC approved mineral symbols](https://rruff.info/rruff_1.0/uploads/MM85_291.pdf), \insertCite{Warr_2021}{georefdatar}
#'
#' @references{
#' \insertRef{Lafuente_2015}{georefdatar}
Expand Down Expand Up @@ -37,9 +47,9 @@
#' minSearch('Pyh$', ignore.case = FALSE)
#'
minSearch <- function(pattern, ignore.case= TRUE) {
res <- unique(c(
grep(pattern, georefdatar::mins$Symbol, ignore.case = ignore.case),
grep(pattern, georefdatar::mins$Name, ignore.case = ignore.case)
res <- base::unique(c(
base::grep(pattern, georefdatar::mins$Symbol, ignore.case = ignore.case),
base::grep(pattern, georefdatar::mins$Name, ignore.case = ignore.case)
))

georefdatar::mins[res, ]
Expand All @@ -65,5 +75,5 @@ minSearch <- function(pattern, ignore.case= TRUE) {
#' minsForChemistry('Mn.*\\(SiO4\\)$')
#'
minsForChemistry <- function(pattern, ignore.case= FALSE) {
georefdatar::mins[grep(pattern, georefdatar::mins$Chemistry, ignore.case = ignore.case), ]
georefdatar::mins[base::grep(pattern, georefdatar::mins$Chemistry, ignore.case = ignore.case), ]
}
2 changes: 1 addition & 1 deletion R/PeriodicTable.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#' `r paste(names(pte), collapse= ', ')`
#'
#' @seealso [IUPAC_StdAW] for the standard atomic weights of the elements
#' recommended by [IUPAC](https://www.iupac.org)
#' recommended by [IUPAC](https://iupac.org)
#'
#' @references{
#' \insertRef{pubChemPTable}{georefdatar}
Expand Down
2 changes: 1 addition & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ output: github_document
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE, message = FALSE)
```
# georefdatar -- Geosciences Reference Data Sets in R
# georefdatar -- Geosciences Reference Datasets in R


<!-- badges: start -->
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

# georefdatar – Geosciences Reference Data Sets in R
# georefdatar – Geosciences Reference Datasets in R

<!-- badges: start -->

Expand Down
8 changes: 8 additions & 0 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# georefdatar 0.6.4

* This is a new release.

## R CMD check results

0 errors | 0 warnings | 0 note

8 changes: 1 addition & 7 deletions inst/REFERENCES.bib
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ @InCollection{Lafuente_2015
month = nov,
pages = {1--30},
doi = {10.1515/9783110417104-003},
url = {https://rruff.info/about/downloads/HMC1-30.pdf},
}

@Article{Warr_2021,
Expand All @@ -92,7 +91,6 @@ @Article{Warr_2021
pages = {1--30},
doi = {10.1180/mgm.2021.43},
publisher = {Mineralogical Society},
url = {https://www.cambridge.org/core/journals/mineralogical-magazine/article/imacnmnc-approved-mineral-symbols/62311F45ED37831D78603C6E6B25EE0A},
}

@InCollection{Rudnick2003,
Expand All @@ -117,7 +115,6 @@ @InCollection{Rudnick2014
isbn = {978-0-08-098300-4},
pages = {1--51},
doi = {10.1016/B978-0-08-095975-7.00301-6},
url = {https://www.sciencedirect.com/science/article/pii/B9780080959757003016},
}

@Article{Steiger1977,
Expand All @@ -142,7 +139,6 @@ @Article{Renne2011
pages = {5097--5100},
volume = {75},
doi = {10.1016/j.gca.2011.06.021},
url = {https://www.sciencedirect.com/science/article/pii/S0016703711003498},
}

@Article{Renne2001,
Expand Down Expand Up @@ -180,7 +176,6 @@ @Article{Villa2015
pages = {382--385},
volume = {164},
doi = {10.1016/j.gca.2015.05.025},
url = {https://www.sciencedirect.com/science/article/pii/S0016703715003208},
}

@Article{Hiess2012,
Expand All @@ -206,7 +201,6 @@ @Article{Lee2006
pages = {4507--4512},
volume = {70},
doi = {10.1016/j.gca.2006.06.1563},
url = {https://www.sciencedirect.com/science/article/pii/S0016703706018679},
}

@Article{Cohen2013,
Expand Down Expand Up @@ -262,7 +256,7 @@ @Book{Rollinson1993
year = {1993},
}


@TechReport{Prohaska2022,
author = {Prohaska, Thomas and Irrgeher, Johanna and Benefield, Jacqueline and Böhlke, John K. and Chesson, Lesley A. and Coplen, Tyler B. and Ding, Tiping and Dunn, Philip J. H. and Gröning, Manfred and Holden, Norman E. and Meijer, Harro A. J. and Moossen, Heiko and Possolo, Antonio and Takahashi, Yoshio and Vogl, Jochen and Walczyk, Thomas and Wang, Jun and Wieser, Michael E. and Yoneda, Shigekazu and Zhu, Xiang-Kun and Meija, Juris},
institution = {IUPAC},
Expand Down
4 changes: 4 additions & 0 deletions inst/WORDLIST
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,7 @@ PPGE
MREE
eontheme
eratheme
IUPAC
CNMNC
CIAAW
CMD
4 changes: 2 additions & 2 deletions man/IUPAC_StdAW.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/georefdatar_package.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 13 additions & 2 deletions man/mins.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/pte.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions tests/testthat/test-Minerals.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
test_that("test mineral search functions work", {
expect_equal(minSearch("Prp")$Name, "Pyrope")
expect_equal(minSearch("Pyrope")$Symbol, "Prp")
expect_equal(minSearch("Pyrope")$Chemistry, minSearch("Prp")$Chemistry)

expect_equal(minsForChemistry("^Ce\\(PO4\\)$")$Symbol, "Mnz-Ce")
expect_equal(minsForChemistry("^Ce\\(PO4\\)$")$Name, "Monazite-(Ce)")

})

0 comments on commit ac71f3e

Please sign in to comment.