ftirplot: Plots the Crystalline Area of a FTIR Spectrum of Starch

Description Usage Arguments Author(s) Examples

View source: R/crcal.R

Description

Produces a graph of the crystalline area of a FTIR spectrum of starch and the Gauss curve.

Usage

1
ftirplot(spectrum, gauss, lim = c(1190, 1160, 985, 950))

Arguments

spectrum

matrix. The matrix of FTIR spectrum baseline-corrected by drawing a tangentline in the 800-1300 cm-1 region. The first row corresponds to wavelength; the second row corresponds to intensity.

gauss

matrix. The matrix of Gauss curve (gaussian holocrystalline-peak).

lim

vector. Regions of the FTIR spectrum comprising the fixing points of the Gauss curve.

Author(s)

Claudio Pozo Valenzuela [aut, cre] and Saddys Rodriguez-llamazares [aut]

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# Convert data frame to matrix, select A-type starch
spectrum <- as.matrix(t(FTIR[, c('wavelength','A')]))
# List of crystallinity components
crs <- fitFTIRc(spectrum = spectrum, mu = 1180, sigma = 60, k = 1, lim = c(1190, 1160, 985, 955))
# Original matrix
original <- crs$original
# Gaussian curve fit
gauss <- crs$gauss
# Plots the crystalline area of a FTIR spectrum
ftirplot(spectrum=original, gauss=gauss, lim=c(1190, 1160, 985, 950))

Example output

Loading required package: flux
Loading required package: caTools
This is flux 0.3-0
Loading required package: pracma

Attaching package: 'pracma'

The following objects are masked from 'package:caTools':

    combs, trapz

cryst documentation built on May 1, 2019, 8:10 p.m.

Related to ftirplot in cryst...