regroup {powdR}R Documentation

regroup

Description

regroup allows an alternative grouping structure to be applied to powdRfps and powdRafps objects. For more details see ?regroup.powdRfps or ?regroup.powdRafps.

Usage

regroup(x, ...)

Arguments

x

A powdRfps or powdRafps object

...

Other parameters passed to methods e.g. fps.powdRlib

Details

powdRfps and powdRafps objects contain a data frame called phases_grouped that summarises phase concentrations based on defined mineral groups from the powdRlib reference library. regroup allows you to change this grouping structure by supplying new group identities.

Value

a powdRfps or powdRafps object with components:

tth

a vector of the 2theta scale of the fitted data

fitted

a vector of the count intensities of fitted XRPD pattern

measured

a vector of the count intensities of original XRPD measurement (aligned)

residuals

a vector of the residuals (measured minus fitted)

phases

a dataframe of the phases used to produce the fitted pattern

phases_grouped

the phases dataframe grouped and summed by phase_name

obj

named vector of the objective parameters summarising the quality of the fit

weighted_pure_patterns

a dataframe of reference patterns used to produce the fitted pattern. All patterns have been weighted according to the coefficients used in the fit

coefficients

a named vector of coefficients used to produce the fitted pattern

inputs

a list of input arguments used in the function call

Examples

#Load the minerals library
data(minerals)

#Load the soils data
data(soils)

#Load the regrouping structure
data(minerals_regroup)

## Not run: 
fps_sandstone <- fps(lib = minerals,
                     smpl = soils$sandstone,
                     refs = minerals$phases$phase_id,
                     std = "QUA.1",
                     align = 0.2)

fps_sandstone_regrouped <- regroup(fps_sandstone,
                                   minerals_regroup)

fps_sandstone_regrouped$phases_grouped


## End(Not run)

[Package powdR version 1.3.0 Index]