pca_scores_plot {structToolbox} | R Documentation

## pca_scores_plot class

### Description

2d scatter plot of principal component scores.

### Usage

    pca_scores_plot(
      components = c(1, 2),
      points_to_label = "none",
      factor_name,
      ellipse = "all",
      label_filter = character(0),
      label_factor = "rownames",
      label_size = 3.88,
      ...
    )

### Arguments

`components` | The principal components to plot (`numeric(2)`)
`points_to_label` | "none", "all", or "outliers" will be labelled on the plot.
`factor_name` | The sample_meta column name to use for colouring the points. You can provide up to two factors for this plot.
`ellipse` | "all" will plot all ellipses, "group" will only plot group ellipses, "none" will not plot any ellipses and "sample" will plot ellipse for all samples (ignoring group).
`label_filter` | Only include labels for samples in the group specified by label_filter. If zero length then all labels will be included.
`label_factor` | The sample_meta column to use for labelling the samples. If 'rownames' then the rownames will be used.
`label_size` | The text size of the labels.NB ggplot units, not font size units. Default 3.88.
`...` | additional slots and values passed to struct_class

### Value

struct object

### Examples

    D = iris_DatasetExperiment()
    M = mean_centre() + PCA()
    M = model_apply(M,D)
    C = pca_scores_plot(factor_name = 'Species')
    chart_plot(C,M[2])

[Package structToolbox version 0.99.8 Index]