Draw: Draw signals or their PCA scores/loadings.

Description Usage Arguments Details Author(s) See Also Examples

View source: R/Draw.R

Description

Draws FIDs, spectra or their PCA scores/loadings.

Usage

1
2
3
4
Draw(Signal_data, type.draw = c("signal","pca"),
     output = c("default","window","png","pdf"), 
     dirpath = ".",filename = "%003d", height = 480, 
     width = 640, pdf.onefile = TRUE, ...)

Arguments

Signal_data

Matrix containing the FIDs or spectra, one line per FID/spectrum.

type.draw

Either "signal" or "pca", which calls respectively DrawSignal or DrawPCA to do the drawing.

output

Specifies how to display the drawings:

default

The output is the default one.

window

Create a new window for each page.

png

Create and save a new png image for each image.

pdf

Create and save a new pdf image for each image.

dirpath

The path to the directory where the png or pdf are outputted.

filename

The filenames of the png and pdf, see argument filename in grDevices::png for more details.

height

Height of the png and pdf in pixels.

width

Width of the png and pdf in pixels.

pdf.onefile

Wen output is set to "pdf" and there are mutliples pages, if pdf.onefile is TRUE, all the pages are in the same file and if it is FALSE all the pages are in a different pdf file.

...

The remaining arguments are passed either to DrawSignal or DrawPCA.

Details

Depending on the type.draw value, it can draw each row of Signal_data in a way described by subtype or the PCA scores or loadings (depending on the type.pca value) of all the FIDs/spectra in Signal_data.

Author(s)

BenoƮt Legat & Manon Martin

See Also

See Also DrawSignal and DrawPCA.

Examples

1
2
3
4
5
6
7
8
# Draw each signal Real part and Mod in separate png with name end001 end002, ...
# Draw the spectra
require(PepsNMRData)
Draw(FinalSpectra_HS, type.draw = "signal", 
         output="window",subtype="together")

# Draw a PCA
Draw(FinalSpectra_HS, type.draw="pca",output="window")

ManonMartin/PepsNMR documentation built on Nov. 28, 2021, 6:22 p.m.