Function that converts scale names is now accessible (exported).

Capitalised scale names so they match more variations (remember, matching uses tolower(), so no need to start with lowercase).
master
Taha Ahmed 8 years ago
parent 1dee1918c1
commit dc0fcb0629

@ -9,6 +9,7 @@ export(Kelvin2Celsius)
export(LoadRData2Variable)
export(LongtableXtableHeader)
export(ProvideSampleId)
export(RefCanonicalName)
export(SHE2AVS)
export(SubfigureGenerator)
export(SubstrateHistory)

@ -39,34 +39,35 @@ SHE2AVS <- function(she) {
#' @param refname string
#'
#' @return the canonical name or empty string
#' @export
RefCanonicalName <- function(refname) {
# scale names
electrode.system <- list()
electrode.system[["SHE"]] <-
c("SHE",
"standard hydrogen",
"standard hydrogen electrode")
"Standard hydrogen",
"Standard hydrogen electrode")
electrode.system[["AgCl/Ag"]] <-
c("AgCl/Ag",
"Ag/AgCl",
"AgCl",
"silver-silver chloride",
"silver chloride",
"Silver-Silver chloride",
"Silver chloride",
"SSC") # saturated silver-silver chloride is sometimes abbreviated SSC
electrode.system[["Hg2Cl2/Hg"]] <-
c("Hg2Cl2/Hg",
"Hg/Hg2Cl2",
"Hg2Cl2",
"calomel-mercury",
"mercury-calomel",
"Calomel-Mercury",
"Mercury-Calomel",
"SCE")
electrode.system[["AVS"]] <-
c("AVS",
"vacuum",
"vacuum scale",
"absolute",
"absolute scale",
"absolute vacuum scale")
"Vacuum",
"Vacuum scale",
"Absolute",
"Absolute scale",
"Absolute vacuum scale")
electrode.system[["Li"]] <-
c("Li",
"Li/Li+",

Loading…
Cancel
Save