Description Usage Arguments Author(s) See Also Examples

The function draws the PCA scores or loadings of the FIDs/spectra given in the matrix `Signal_data`

.

Do not call this function directly but rather call `Draw`

to specify how the plot will be returned.

1 2 3 4 |

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

`drawNames` |
If |

`main` |
Plot title. |

`Class` |
Vector (numeric or character) indicating the class of each spectra. Used for scores plot only. |

`axes` |
Vector of score or loading numbers to be plotted. If it represents the score's numbers, only the first two elements are used. |

`type.pca` |
The type of plot, either |

`loadingstype` |
The type of loadings plot, either a line plot ( |

`num.stacked` |
Number of stacked plots for the loadings plots. |

`xlab` |
Label of the x-axis of loadings plots. |

`createWindow` |
If |

BenoĆ®t Legat & Manon Martin

See also `Draw`

and `DrawSignal`

.

1 2 3 4 5 6 7 8 9 10 | ```
require(PepsNMRData)
# Draw loadings
DrawPCA(FinalSpectra_HS, main = "PCA loadings plot",
Class = NULL, axes =c(1,3, 5), type ="loadings", loadingstype="l",
num.stacked=4, xlab="ppm", createWindow = TRUE)
# Draw scores
class = substr(rownames(FinalSpectra_HS),5,5)
DrawPCA(FinalSpectra_HS, drawNames = TRUE, main = "PCA scores plot",
Class = class, axes = c(1,2), type = "scores", createWindow = TRUE)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.