powdRlib: Create an XRPD reference library

Description Usage Arguments Value Examples

View source: R/powdRlib.R

Description

A constructor function for creating a powdRlib object from two tables of data. The resulting powdRlib object is required when using fps or afps.

Usage

1
powdRlib(xrd_table, phases_table, check_names)

Arguments

xrd_table

A data frame of the count intensities of the XRPD reference patterns, all scaled to same maximum intensity, with their 2theta axis as the first column.

phases_table

A data frame of the required data (phase ID, phase name, and reference intensity ratio) for each reference pattern.

check_names

A logical argument defining whether the column names in the data supplied in xrd_table are syntactically valid variable names and are not duplicated. Default = TRUE.

Value

a powdRlib object with components:

xrd

a data frame of the count intensities of the reference patterns

tth

a vector of the 2theta axis

phases

a 3 column data frame of the IDs, names and reference intensity ratios of the reference pattern

Examples

1
2
3
4
5
6
7
8
#load an example xrd_table
data(minerals_xrd)
#load an example phases_table
data(minerals_phases)

#Create a reference library object
xrd_lib <- powdRlib(xrd_table = minerals_xrd,
                    phases_table = minerals_phases)

powdR documentation built on Aug. 13, 2021, 5:08 p.m.