Learn R Programming

powdR (version 1.1.0)

powdRlib: Create an XRD reference library

Description

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

Usage

powdRlib(xrd_table, phases_table)

Arguments

xrd_table

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

phases_table

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

Value

a list with components:

xrd

a data frame of reference patterns

tth

a vector of the 2theta measurement intervals

phases

a data frame of the id, name and reference intensity ratio of each reference pattern

Examples

Run this code
# NOT RUN {
#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)
# }

Run the code above in your browser using DataLab