42
Package ‘chelyabinsk’ June 23, 2017 Type Package Title Express geochemical datasets Version 1.0 Date 2016-09-29 Author Tak Kunihiro Maintainer Tak Kunihiro <[email protected]> Description R package for geochemical datasets License GPL (>= 2) RoxygenNote 6.0.1 Imports testthat, roxygen2, dplyr, jpeg, png, XML, yaml, urltools R topics documented: chelyabinsk-package .................................... 2 cbk.balance ......................................... 3 cbk.category ......................................... 3 cbk.convector ........................................ 4 cbk.convert.casteml ..................................... 4 cbk.download.casteml .................................... 5 cbk.download.casteml.1 ................................... 6 cbk.download.image .................................... 7 cbk.exec ........................................... 8 cbk.iso ............................................ 9 cbk.lame.acqify ....................................... 9 cbk.lame.atomify ...................................... 10 cbk.lame.colMeans ..................................... 11 cbk.lame.colSds ....................................... 12 cbk.lame.delivery ...................................... 12 cbk.lame.drop.chem ..................................... 13 cbk.lame.drop.dharma ................................... 14 cbk.lame.drop.stone ..................................... 14 cbk.lame.dump ....................................... 15 cbk.lame.fetch.error ..................................... 16 cbk.lame.merge ....................................... 16 cbk.lame.merge.error .................................... 17 cbk.lame.normalize ..................................... 18 cbk.lame.reduce ....................................... 18 1

Package ‘chelyabinsk’ · Chelyabinsk allows you to handle comprehensive geochemical dataset. As a first step, you plot REE and SPIDER diagram using appropriate normalization

  • Upload
    others

  • View
    4

  • Download
    0

Embed Size (px)

Citation preview

  • Package ‘chelyabinsk’June 23, 2017

    Type PackageTitle Express geochemical datasetsVersion 1.0Date 2016-09-29Author Tak KunihiroMaintainer Tak Kunihiro Description R package for geochemical datasetsLicense GPL (>= 2)RoxygenNote 6.0.1Imports testthat, roxygen2, dplyr, jpeg, png, XML, yaml, urltools

    R topics documented:chelyabinsk-package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2cbk.balance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3cbk.category . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3cbk.convector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4cbk.convert.casteml . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4cbk.download.casteml . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5cbk.download.casteml.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6cbk.download.image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7cbk.exec . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8cbk.iso . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9cbk.lame.acqify . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9cbk.lame.atomify . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10cbk.lame.colMeans . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11cbk.lame.colSds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12cbk.lame.delivery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12cbk.lame.drop.chem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13cbk.lame.drop.dharma . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14cbk.lame.drop.stone . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14cbk.lame.dump . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15cbk.lame.fetch.error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16cbk.lame.merge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16cbk.lame.merge.error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17cbk.lame.normalize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18cbk.lame.reduce . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

    1

  • 2 chelyabinsk-package

    cbk.lame.regulate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19cbk.lame.rep . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20cbk.lame.stat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20cbk.lame.texify1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21cbk.path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21cbk.periodic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22cbk.plot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22cbk.plot.balance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23cbk.plot.lead . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24cbk.plot.lithium . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25cbk.plot.message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25cbk.plot.oxygen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26cbk.plot.ree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27cbk.plot.spider . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28cbk.plot.spots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29cbk.plot.trace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29cbk.read.casteml . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30cbk.read.dflame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31cbk.read.ionml . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32cbk.read.tblame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33cbk.read.yaml . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33cbk.ref . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34cbk.texify . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35cbk.vector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35cbk.write.casteml . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36cbk.write.tblame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37cbk.write.yaml . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37ionml.convert.ioncsv . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38ionml.convert.qtegracsv2ioncsv . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39ionml.read.laicpqms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39ionml.read.session . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

    Index 42

    chelyabinsk-package Express element distribution using comprehensive geochemicaldatasets

    Description

    Chelyabinsk allows you to handle comprehensive geochemical dataset. As a first step, you plot REEand SPIDER diagram using appropriate normalization. Then, using both in-situ and whole-rockdatasets, you obtain element quantitative-distribution among phases with mass-balance calculation.

  • cbk.balance 3

    cbk.balance Do mass balance calculation

    Description

    Do mass balance calculation

    Usage

    cbk.balance(datain, element, phase, mode, density)

    Arguments

    datain Element abundances with row "WR"

    element Vector of string such for c("Ba", "Nb", "La"...)

    phase Vector of name of phases such for c("ol", "pig")

    mode Vector of modal abundance of phases with label

    density Vector of density of phases with label

    Value

    Element abundances with rows of remainder and series of quantity, and columns of density andmode

    See Also

    cbk.lame.normalize

    cbk.category Suggest categories to plot

    Description

    Suggest categories to plot

    Usage

    cbk.category(pmlfile_or_stone = NULL)

    Arguments

    pmlfile_or_stone

    A CASTEML file that exits locally or stone-ID (or pmlame) to survey cate-gories. Default is NULL and return all categories regardless their plotability.

    Value

    Categories in preferred order

  • 4 cbk.convert.casteml

    Examples

    pmlfile

  • cbk.download.casteml 5

    Arguments

    pmlfile File path to CASTEML file.

    category Category specifier that is passed to casteml convert.

    force Flag to force convert again.

    verbose Output debug info (default: TRUE).

    format Format specifier that is passed to casteml convert.

    Value

    Path of the converted file.

    See Also

    casteml convert and https://github.com/misasa/casteml

    Examples

    pmlfile

  • 6 cbk.download.casteml.1

    Details

    An user should specify Recursive and recursive option not a part of argument ‘stone’ but explicitly.

    Value

    Path to CASTEML file that was downloaded.

    See Also

    casteml download, https://github.com/misasa/casteml, and cbk.convert.casteml

    Examples

    stone

  • cbk.download.image 7

    Details

    This function was created on 2017-04-11 to download CASTEML file by its own from Medusa andthe first argument can only accept single ‘stone’ unlike cbk.download.casteml can accept an arrayconsists of stones.

    Value

    Path to CASTEML file that was downloaded.

    See Also

    casteml download, https://github.com/misasa/casteml, and cbk.convert.casteml cbk.download.casteml

    Examples

    stone

  • 8 cbk.exec

    See Also

    casteml download, https://github.com/misasa/casteml, and cbk.convert.casteml

    Examples

    pmlfile

  • cbk.iso 9

    cbk.iso Return properties of isotope

    Description

    Return properties of isotope. It is in a form of pmlame.

    Usage

    cbk.iso(isomeas = NULL, property = "weight")

    Arguments

    isomeas A name of isotope such as ‘Li7’ and ‘Rb87’.property A name of PROPERTY that is one of ‘proton’, ‘nucleon’, ‘weight’, ‘ratio’,

    ‘symbol’, or ‘pseudo.atomic.weight’.

    Value

    A scalar of property or pmlame of isotope table

    See Also

    cbk.periodic, isotope.m, isotope_constant.m

    Examples

    cbk.iso()cbk.iso('Li7')cbk.iso('Li7','ratio')

    cbk.lame.acqify Create pmlame with acqlist from one with stonelist

    Description

    Create pmlame with acqlist from one with stonelist

    Usage

    cbk.lame.acqify(reflame, acqlist, stonify_regexp = "@[[:digit:]]+$",verbose = FALSE)

    Arguments

    reflame A pmlame of reference with row of stone such as ‘ref_cpx_klb1’ and column ofchem such as ‘Sr’ [g/g].

    acqlist List of analysis such as ‘ref_cpx_klb1@1’.stonify_regexp A regexp string to stonefy analyses. Matched string will be stripped off from

    acqlist to have stonelist.verbose Output debug info (default: FALSE).

  • 10 cbk.lame.atomify

    Value

    A pmlame with row of analysis and columns of chem [g/g].

    Examples

    reflame

  • cbk.lame.colMeans 11

    • M(Li7) = m(Li)/R(Li7)

    • M(Si9) = m(Si)/R(Si29)

    Li

  • 12 cbk.lame.delivery

    cbk.lame.colSds Return standard deviation of each chem

    Description

    Return standard deviation of each chem

    Usage

    cbk.lame.colSds(pmlame, stonify_regexp = "@[[:digit:]]+$")

    Arguments

    pmlame A pmlame with row of stone and column of chem [g/g].

    stonify_regexp A regexp string to be stripped off to stonefy analyses. Matched string will bestripped off from acqlist to have stonelist.

    Value

    A pmlame with standard deviation value of each column

    Examples

    pmlame

  • cbk.lame.drop.chem 13

    Details

    With ion Si29 intensity 3.85e+05 [cps], element SiO2 abundance 59 wt estimated to be 1.25 ppm.

    Value

    Delivery rate of element from solid target to detector.

    Examples

    pmlame0

  • 14 cbk.lame.drop.stone

    cbk.lame.drop.dharma Remove rows where all values are NA

    Description

    Remove rows where all values are NA

    Usage

    cbk.lame.drop.dharma(pmlame, column = FALSE, verbose = FALSE)

    Arguments

    pmlame A pmlame with row of stone and column of chem [g/g].

    column Flag to remove columns

    verbose Output debug info (default: FALSE).

    Value

    A pmlame without removed rows

    Examples

    pmlfile

  • cbk.lame.dump 15

    See Also

    cbk.lame.drop.stone

    Examples

    pmlame

  • 16 cbk.lame.merge

    cbk.lame.fetch.error Extract error columns from pmlame as errorlame

    Description

    Extract error columns from pmlame as errorlame

    Usage

    cbk.lame.fetch.error(pmlame, chem = NULL)

    Arguments

    pmlame A pmlame with both mean and error.

    chem Target chem you want to extract.

    Value

    An errorlame that is a pmlame of only error colums with label of ‘chem’ such as ‘Li7’ instead of‘Li7_error’. Note that columns that exist in input will be returned.

    Examples

    pmlame

  • cbk.lame.merge.error 17

    Examples

    pmlame1

  • 18 cbk.lame.reduce

    cbk.lame.normalize Return normalized element abundances

    Description

    Return normalized element abundances. Note that only elements that exist both in pmlame andreflame are processed. See also "Geochemical Modelling..." by Janousek et al. (2015)

    Usage

    cbk.lame.normalize(pmlame, reflame, suffix_after_chem = NULL,verbose = FALSE)

    Arguments

    pmlame A pmlame with row of stone and column of chem [g/g].

    reflame A pmlame of a reference. This can be a pmlame of multiple references.suffix_after_chem

    String to recognize column of errors. Feed "_error" when necessary. As ofFebruary 18, 2017, this exists only for compatibility.

    verbose Output debug info (default: FALSE).

    Value

    A ref-normalized daraframe with only elements defined in ref.

    See Also

    cbk.ref and cbk.periodic

    Examples

    pmlame

  • cbk.lame.regulate 19

    Value

    A pmlame with converted columns

    Examples

    pmlfile

  • 20 cbk.lame.stat

    cbk.lame.rep Replicate pmlame in horizontal or vertical direction

    Description

    Replicate pmlame in horizontal or vertical direction

    Usage

    cbk.lame.rep(pmlame, times, direction = NULL)

    Arguments

    pmlame A pmlame to be replicated

    times Number of replication

    direction Direction to make replicate (‘h’ or ‘v’). This function guesses direction to bereplicated when pmlame is single row or column.

    Value

    A pmlame with repeated column or row.

    Examples

    pmlame0

  • cbk.lame.texify1 21

    See Also

    cbk.lame.colMeans and cbk.lame.colSds

    Examples

    pmlame

  • 22 cbk.plot

    Value

    An absolute path of files stored in local library

    Examples

    dflame.csv

  • cbk.plot.balance 23

    Arguments

    pmlfile_or_stone

    A CASTEML file that exits locally or stone-ID (or pmlame).

    opts List of further options for plot. Two options such as ‘list(legendp=TRUE, Re-cursivep=FALSE)’ are available.

    category Category specifier that is passed to casteml convert.

    Value

    A pmlame used to plot the diagram.

    See Also

    cbk.plot.trace

    Examples

    cbk.plot(c("20141106120733-593074","20141106120433-380274","20141106120509-983968"))cbk.plot(cbk.path("20081202172326.hkitagawa.pml"))cbk.plot(cbk.path("20081202172326.hkitagawa.pml"),category="trace")cbk.plot(cbk.path("20081202172326.hkitagawa.pml"),category="lead")cbk.plot(cbk.path("20130528105235-594267.pml"),category="trace")cbk.plot(cbk.path("20130528105235-594267.pml"),category="lithium")cbk.plot(cbk.path("20130528105235-594267.pml"),category="oxygen")cbk.plot(cbk.path("20081202172326.hkitagawa.pml"),opts=list(legendp=FALSE))

    cbk.plot.balance Balance quantity of elements in whole rock and phases

    Description

    Balance quantity of elements in whole rock and phases. This calculates quantity of elements in eachphases from mode and element abundances of each phase. Then from calculated whole-rock (WR)quantity of element by summation and measured WR quantity of element, this estimates surplus ordeficit of elements.

    Usage

    cbk.plot.balance(pmlame_or_file, reflame_or_file, modeinfo, verbose = TRUE)

    Arguments

    pmlame_or_file A pmlame or CASTEML file with element abundance of phases without mea-sured WR

    reflame_or_file

    A pmlame or CASTEML file with element abundance of measured WR

    modeinfo A pmlame or TBLAME.csv with mode and density of phases including WR

    verbose Output debug info (default: FALSE).

  • 24 cbk.plot.lead

    Value

    A pmlame with element quantities and mode of phases

    Examples

    reflame

  • cbk.plot.lithium 25

    cbk.plot.lithium Read CASTEML file and create lithium diagram

    Description

    Read CASTEML dataframe and create lithium diagram. This function does not save the createddiagram. You should prepare a canvas in advance.

    Usage

    cbk.plot.lithium(pmlfile_or_stone, opts = NULL, verbose = FALSE,pch = NULL, col = NULL)

    Arguments

    pmlfile_or_stone

    A CASTEML file that exits locally or stone-ID (or pmlame).

    opts List of further options for plot. See cbk.plot.

    verbose Output debug info (default: FALSE).

    pch Array of symbol (default: NULL)

    col Array of color (default: NULL)

    Value

    @return A pmlame used to plot the diagram.

    See Also

    https://github.com/misasa/casteml

    Examples

    pmlfile

  • 26 cbk.plot.oxygen

    Arguments

    pmlfile_or_stone

    A CASTEML file that exits locally or stone-ID (or pmlame)

    text Message to be displayed on diagram. When it is with special caractors, quote itin advance.

    Value

    Dataframe used to plot the diagram

    Examples

    pmlame

  • cbk.plot.ree 27

    cbk.plot.ree Read CASTEML file and create REE diagram

    Description

    Read CASTEML dataframe and create REE diagram. This function tris to blow errorbar. If you donot see errorbar, check pmlame that you feed.

    Usage

    cbk.plot.ree(pmlfile_or_stone, opts = NULL, tableunit = "none",reference = "Wasson.1988", verbose = FALSE, ...)

    Arguments

    pmlfile_or_stone

    A CASTEML file that exits locally or stone-ID (or pmlame).

    opts List of further options for plot. See cbk.plot.

    tableunit Unit to toss to cbk.read.casteml.

    reference Reference of element abundance.

    verbose Output debug info (default: FALSE).

    ... Graphical options that are passed to matplot and legend, such as ‘col’ and ‘pch’.

    Value

    @return A pmlame used to plot the diagram.

    See Also

    https://github.com/misasa/casteml

    Examples

    pmlfile

  • 28 cbk.plot.spider

    cbk.plot.spider Read CASTEML file and create spider diagram

    Description

    Read CASTEML dataframe and create spider diagram. This function does not save the createddiagram. You should prepare a canvas in advance.

    Usage

    cbk.plot.spider(pmlfile_or_stone, opts = NULL, tableunit = "none",property = "atomicnumber", reference = "Wasson.1988", verbose = FALSE,pch = NULL, col = NULL)

    Arguments

    pmlfile_or_stone

    A CASTEML file that exits locally or stone-ID (or pmlame).

    opts List of further options for plot. See cbk.plot.

    tableunit Unit to toss to cbk.read.casteml.

    property Property to align x-axis to pass to cbk.periodic.

    reference Reference of element abundance

    verbose Output debug info (default: FALSE).

    pch Array of symbol (default: NULL)

    col Array of color (default: NULL)

    Value

    A pmlame used to plot the diagram.

    See Also

    https://github.com/misasa/casteml

    Examples

    pmlfile

  • cbk.plot.spots 29

    cbk.plot.spots Read CASTEML file and create spots diagram

    Description

    Read CASTEML dataframe and create spots diagram. This function does not save the createddiagram. You should prepare a canvas in advance.

    Usage

    cbk.plot.spots(pmlfile_or_surface, opts = NULL, imagefile = NULL,verbose = FALSE, pch = NULL, col = NULL)

    Arguments

    pmlfile_or_surface

    A CASTEML file that exits locally or stone-ID (or pmlame).

    opts List of further options for plot. See cbk.plot.

    imagefile Image shown on background of analyzed spots.

    verbose Output debug info (default: FALSE).

    pch Array of symbol (default: NULL)

    col Array of color (default: NULL)

    Value

    A pmlame used to plot the diagram.

    See Also

    https://github.com/misasa/casteml

    Examples

    pmlfile

  • 30 cbk.read.casteml

    Arguments

    pmlfile_or_stone

    A CASTEML file that exits locally or stone-ID (or pmlame).

    opts List of further options for plot. See cbk.plot.

    tableunit Unit to toss to cbk.read.casteml.

    Value

    A pmlame used to plot the diagram.

    See Also

    https://github.com/misasa/casteml

    Examples

    pmlfile

  • cbk.read.dflame 31

    See Also

    cbk.convert.casteml, cbk.read.dflame, and https://github.com/misasa/casteml

    Examples

    pmlfile

  • 32 cbk.read.ionml

    Examples

    pmlfile

  • cbk.read.tblame 33

    cbk.read.tblame Read csvfile created by casteml convert with column ‘unit’

    Description

    Read csvfile with row ‘unit’, that is also referred as ‘tblame’.

    Usage

    cbk.read.tblame(tblame, tableunit = "none", verbose = TRUE)

    Arguments

    tblame A csvfile with columns of chem and rows of stone, with 2nd row ‘unit’.

    tableunit Output unit that will be resolved by cbk.convector (default: "none").

    verbose Output debug info (default: TRUE).

    Details

    This internally calls read.csv, take out row of ‘unit’ and normalized by the ‘unit’ row.

    Value

    A pmlame with unit organized.

    See Also

    cbk.read.dflame, https://github.com/misasa/casteml, and cbk.convector.

    cbk.read.yaml Read a pmlame stored in yamlfile.

    Description

    Read a pmlame stored in yamlfile.

    Usage

    cbk.read.yaml(yamlfile, verbose = TRUE)

    Arguments

    yamlfile A yamlfile with pmlame, that is with columns of chem and rows of stone.

    verbose Output debug info (default: TRUE).

    Details

    This function restores rownames using a column with label ‘rownames’.

    https://github.com/misasa/casteml

  • 34 cbk.ref

    Value

    A pmlame with columns of chem and rows of stone.

    See Also

    cbk.write.yaml, cbk.read.casteml.

    cbk.ref Return element abundances of reference

    Description

    Return element abundances of reference. The reference includes "Wasson.1988", "McDonough.1995",and "Boynton.1989".

    [1] Wasson, J. T., and Kallemeyn, G. W. (1988). Compositions of chondrites. Phil. Trans. Roy. Soc.London A, 325, 535-544. [2] McDonough, W., and Sun, S. (1995). The composition of the earth.Chemical Geology, 120(3-4), 223-253. [3] Janousek, V. et al. (2015). Geochemical Modelling ofIgneous Processes–Principles And Recipes in R Language. Springer

    Usage

    cbk.ref(analysis, tableunit = "none", property = NULL)

    Arguments

    analysis A name of reference that is one of "Wasson.1988", "McDonough.1995", and"Boynton.1989".

    tableunit Output unit that will be resolved by ‘cbk.convector’. (default: "none")

    property A numeric vector of element property with label that serves as sort key (default:NULL). You can feed output from ‘cbk.periodic’.

    Value

    A pmlame of element abundances

    See Also

    cbk.periodic

    Examples

    cbk.ref("Boynton.1989","ppm")cbk.ref("Wasson.1988","ppm",cbk.periodic('atomicnumber'))cbk.ref("Wasson.1988","ppm",cbk.periodic('volatility'))cbk.ref("McDonough.1995","ppm",cbk.periodic('volatility'))

  • cbk.texify 35

    cbk.texify Convert CASTEML file to multple texfiles

    Description

    Convert CASTEML file to multple texfiles. This function splits chem and parse the datasets sepa-ratedly.

    Usage

    cbk.texify(pmlfile_or_stone, outfile = "table-auto.tex", chem = NULL,ncol = 11, verbose = FALSE)

    Arguments

    pmlfile_or_stone

    A CASTEML file that exits locally or stone-ID (or pmlame).

    outfile File path to texfile.

    chem List of chem such as c("Li","Si","Ca","Ca.1","Rb").

    ncol Number of columns per a table.

    verbose Output debug info.

    Value

    Vector of file path to texfiles.

    See Also

    cbk.lame.texify1

    cbk.vector Convert dataframe with label to vector with label

    Description

    Convert dataframe with label to vector with label. It seems that this conversion is necessary forcalcuration.

    Usage

    cbk.vector(df)

    Arguments

    df A dataframe with label

    Details

    This is written at initial stage of development. May be not that useful.

  • 36 cbk.write.casteml

    Value

    A vector with label

    Examples

    cbk.vector(data.frame(row.names=c("density"), ol=c(3.300), pig=c(3.400), WR=c(3.3)))

    cbk.write.casteml Write a pmlame to CASTEML file

    Description

    Write a pmlame to CASTEML file

    Usage

    cbk.write.casteml(pmlame, outfile = NULL, verbose = TRUE)

    Arguments

    pmlame A pmlame with row of stone and column of chem [g/g].

    outfile File path to casteml file

    verbose Output debug info (default: TRUE).

    Value

    File path to a casteml file

    See Also

    cbk.read.casteml

    Examples

    pmlame0

  • cbk.write.tblame 37

    cbk.write.tblame Write pmlame as TBLAME.csv

    Description

    Write pmlame as TBLAME.csv

    Usage

    cbk.write.tblame(pmlame, outfile, verbose = TRUE)

    Arguments

    pmlame A pmlame with row of stone and column of chem [g/g].

    outfile Path of TBLAME.csv, which is a csvfile with rows of stone and columns ofchem.

    verbose Output debug info (default: FALSE).

    Value

    Path of TBLAME.csv

    See Also

    write.csv, cbk.read.tblame, and https://github.com/misasa/casteml

    cbk.write.yaml Write a pmlame to yamlfile.

    Description

    Write a pmlame to yamlfile.

    Usage

    cbk.write.yaml(pmlame, outfile = NULL, verbose = TRUE)

    Arguments

    pmlame A pmlame with row of stone and column of chem [g/g].

    outfile Path to yamlfile with a pmlame.

    verbose Output debug info (default: TRUE).

    Details

    This function uses yaml::as.yaml to save pmlame. Since yaml::as.yaml drops rownames, thisfunction stores rownames using a column with label ‘rownames’.

    https://github.com/misasa/casteml

  • 38 ionml.convert.ioncsv

    Value

    Path to yamlfile.

    See Also

    cbk.read.yaml and cbk.write.casteml.

    ionml.convert.ioncsv Convert IONCSV to IONML

    Description

    Convert IONCSV to IONML. This program assumes extensions of IONCSV and IONML to be‘.ion’ and ‘.xml’, respectively.

    The IONCSV consists of columns of time and ion intensities. The first column of each line shouldbe number of ‘cycle’. Colname of the IONCSV should be ‘time’ and name of element followed byatomic weight (‘Si29’ instead of ‘29Si’).

    Usage

    ionml.convert.ioncsv(ioncsv, outfile = NULL, force = FALSE)

    Arguments

    ioncsv Name of IONCSV.

    outfile Name of IONML that will be created.

    force Flag to force convert again.

    Value

    Name of IONML that was created.

    See Also

    ionml.convert.qtegracsv2ioncsv

    Examples

    ioncsv

  • ionml.convert.qtegracsv2ioncsv 39

    ionml.convert.qtegracsv2ioncsv

    Convert LAICPQMS-type QTEGRACSV by Analyte G2 with iCAP-Qto IONCSV

    Description

    Convert LAICPQMS-type QTEGRACSV by Analyte G2 with iCAP-Q to IONCSV. Filter metadataout and append column of cycle number.

    This program assumes extensions of LAICPQMS-type QTEGRACSV and IONCSV to be ‘.csv’and ‘.ion’, respectively.

    The IONCSV consists of columns of time and ion intensities. The first column of each line shouldbe number of ‘cycle’. Colname of the IONCSV should be ‘time’ and name of element followed byatomic weight (‘Si29’ instead of ‘29Si’).

    Usage

    ionml.convert.qtegracsv2ioncsv(acqfile, outfile = NULL, force = FALSE)

    Arguments

    acqfile Name of LAICPQMS-type QTEGRACSV exported form Qtegra

    outfile Name of IONCSV that will be created

    force Flag to force convert again

    Value

    Name of IONCSV that was created

    See Also

    ionml-laicpqms.plx

    Examples

    acqfile

  • 40 ionml.read.session

    Usage

    ionml.read.laicpqms(pmlame_or_file, t0 = 5, t1 = 20, t2 = 25, t3 = 60,ref = "Si29", verbose = FALSE, ionml = TRUE)

    Arguments

    pmlame_or_file ion-type pmlame or IONML or QTEGRACSV.

    t0 When baseline starts (default: 5 s).

    t1 When baseline ends (default: 20 s).

    t2 When ion starts (default: 25 s).

    t3 When ion ends (default: 60 s).

    ref reference ion such as ‘Si29’.

    verbose Output debug info (default: FALSE).

    ionml Read IONML file instead of IONCSV (default: TRUE).

    Details

    Signal between ‘t2’ and ‘t3’ is regarded as main signal from a sample (online). Signal between‘t0’ and ‘t1’ is regarded as background. Mean of latter is calculated as BASELINE. Then theBASELINE is subtracted from the main signal. The main signal is normalized by ‘ref’. Thisfunction returns the BASELINE subtracted and reference normalized ‘ionic-ratio’ with statisticalinformation at the bottom of the table. Detection limit is defined by 3 times standard error ofBASELINE measument.

    Value

    The ion-type pmlame of ion-to-ref ratio online with rows of statistical information.

    See Also

    ionml.convert.qtegracsv2ioncsv ionml.convert.ioncsv

    Examples

    pmlfile0

  • ionml.read.session 41

    Usage

    ionml.read.session(ionml.xml, t0 = 5, t1 = 20, t2 = 25, t3 = 60,ref = "Si29", error = "sterr", intensityp = FALSE, verbose = FALSE,ionml = TRUE)

    Arguments

    ionml.xml Paths to IONML.

    t0 When baseline starts (default: 5 s, scalar or vector)

    t1 When baseline ends (default: 20 s, scalar or vector).

    t2 When ion starts (default: 25 s, scalar or vector).

    t3 When ion ends (default: 60 s, scalar or vector).

    ref Reference ion such as ‘Si29’.

    error Use ‘sterr’, ‘DL’, or ‘mix’ as error. When ‘mix’, error is delection limit ‘DL’instead of standard error ‘sderr’ when DL is larger than ‘sderr’.

    intensityp Have mean and sd of intensity instead of mean and sderr of ionic ratio

    verbose Output debug info (default: FALSE).

    ionml Read IONML file instead of IONCSV (default: TRUE).

    Value

    Pseudo-pmlame with average and standard error of ionic ratio

    See Also

    ionml.read.laicpqms

    Examples

    pmlame0

  • Index

    cbk.balance, 3cbk.category, 3cbk.convector, 4, 31, 33cbk.convert.casteml, 4, 6–8, 31cbk.download.casteml, 5, 7, 31cbk.download.casteml.1, 6cbk.download.image, 7cbk.exec, 8cbk.iso, 9cbk.lame.acqify, 9cbk.lame.atomify, 10cbk.lame.colMeans, 11cbk.lame.colSds, 12cbk.lame.delivery, 12cbk.lame.drop.chem, 13cbk.lame.drop.dharma, 14cbk.lame.drop.stone, 14cbk.lame.dump, 15cbk.lame.fetch.error, 16, 19cbk.lame.merge, 16cbk.lame.merge.error, 17cbk.lame.normalize, 3, 18cbk.lame.reduce, 10, 18cbk.lame.regulate, 19cbk.lame.rep, 20cbk.lame.stat, 20cbk.lame.texify1, 21, 35cbk.path, 21cbk.periodic, 9, 18, 22, 28, 34cbk.plot, 22, 24–30cbk.plot.balance, 23cbk.plot.lead, 24cbk.plot.lithium, 25cbk.plot.message, 25cbk.plot.oxygen, 26cbk.plot.ree, 27cbk.plot.spider, 28cbk.plot.spots, 29cbk.plot.trace, 23, 29cbk.read.casteml, 27, 28, 30, 30, 34, 36cbk.read.dflame, 31, 31, 33cbk.read.ionml, 32cbk.read.tblame, 33, 37

    cbk.read.yaml, 33, 38cbk.ref, 18, 34cbk.texify, 35cbk.vector, 35cbk.write.casteml, 36, 38cbk.write.tblame, 37cbk.write.yaml, 34, 37chelyabinsk (chelyabinsk-package), 2chelyabinsk-package, 2

    ionml.convert.ioncsv, 38, 40ionml.convert.qtegracsv2ioncsv, 32, 39,

    40ionml.read.laicpqms, 39, 41ionml.read.session, 40

    read.csv, 33

    shell.exec, 8system, 8

    write.csv, 37

    42

    chelyabinsk-packagecbk.balancecbk.categorycbk.convectorcbk.convert.castemlcbk.download.castemlcbk.download.casteml.1cbk.download.imagecbk.execcbk.isocbk.lame.acqifycbk.lame.atomifycbk.lame.colMeanscbk.lame.colSdscbk.lame.deliverycbk.lame.drop.chemcbk.lame.drop.dharmacbk.lame.drop.stonecbk.lame.dumpcbk.lame.fetch.errorcbk.lame.mergecbk.lame.merge.errorcbk.lame.normalizecbk.lame.reducecbk.lame.regulatecbk.lame.repcbk.lame.statcbk.lame.texify1cbk.pathcbk.periodiccbk.plotcbk.plot.balancecbk.plot.leadcbk.plot.lithiumcbk.plot.messagecbk.plot.oxygencbk.plot.reecbk.plot.spidercbk.plot.spotscbk.plot.tracecbk.read.castemlcbk.read.dflamecbk.read.ionmlcbk.read.tblamecbk.read.yamlcbk.refcbk.texifycbk.vectorcbk.write.castemlcbk.write.tblamecbk.write.yamlionml.convert.ioncsvionml.convert.qtegracsv2ioncsvionml.read.laicpqmsionml.read.sessionIndex