Implementation of 2D Correlation Analysis"

  collapse = TRUE,
  comment = "#>",
  fig.path = "README-"

Purpose of corr2D

The package corr2D implements two-dimensional (2D) correlation analysis in R. It allows the user to calculate and plot homo as well as hetero 2D correlation spectra from an input matrix containing the (preprocessed) spectra. The user can freely choose the reference spectrum used to create the dynamic spectra, how the perturbation vector should be handled, if and how the resulting 2D spectra should be scaled and how many cores should be used to calculate the correlation matrix.
The plot functions offer a wide variety of options to customize the look of 2D spectra. In this context the appearance of the main spectrum can be altered and the 1D reference spectra as well as the color legend can be controlled.
The package also features an example dataset containing preprocessed FT-Raman spectra of a self-healing polymer sample.

How to use corr2D on a simple example

First we need to make the package available and get an example dataset. For illustration purposes we use the FuranMale dataset from the present corr2D package.

data(FuranMale, package = "corr2D")

As the next step we calculate the homo 2D correlation spectra of the FuranMale dataset using the function corr2d() and the first spectrum of the dataset as reference spectrum.

twod <- corr2d(FuranMale, Ref1 = FuranMale[1, ], corenumber = 1)

The last step is to plot the resulting 2D correlation spectra. As an example we plot the synchronous correlation spectrum of the FuranMale dataset. The appearance of the 2D plot can be altered by i.e. using the xlab and ylab options to control the labels at the x- and y-axes.

plot_corr2d(twod, xlab = expression(paste("relative Wavenumber" / cm^-1)),
            ylab = expression(paste("relative Wavenumber" / cm^-1)))

Try the corr2D package in your browser

Any scripts or data that you put into this service are public.

corr2D documentation built on July 17, 2017, 5:02 p.m.