Learn R Programming

powdR (version 1.1.0)

summarise_mineralogy: Summarise the mineralogy from multiple powdRfps and powdRafps outputs

Description

summarise_mineralogy creates a summary table of quantified mineral concentrations across a given dataset using list of multiple powdRfps or powdRafps derived from fps() and afps(), respectively.

Usage

summarise_mineralogy(x, type, order, rwp)

Arguments

x

a list of powdRfps or powdRafps objects.

type

a string specifying whether the table uses all phase ID's, or summarises them according to the phase name. One of "all" or "grouped".

order

a logical operator denoting whether the columns of the resulting summary table are ordered in descending order according to the summed abundance of each phase across the dataset.

rwp

a logical operator denoting whether to include the Rwp as the final column in the output. This provides an objective measure of the difference between the fitted and measured patterns.

Value

a dataframe

Examples

Run this code
# NOT RUN {
data(minerals)
data(soils)

# }
# NOT RUN {
multiple_afps <- lapply(soils, afps,
                        lib = minerals,
                        std = "QUA.1",
                        align = 0.2,
                        lod = 0.1,
                        amorphous = "ORG",
                        amorphous_lod = 1)

sm1 <- summarise_mineralogy(multiple_afps,
                            type = "all",
                            order = TRUE)

sm2 <- summarise_mineralogy(multiple_afps,
                            type = "grouped",
                            order = TRUE)

sm3 <- summarise_mineralogy(multiple_afps,
                            type = "grouped",
                            order = TRUE,
                            rwp = TRUE)
# }

Run the code above in your browser using DataLab