create_pca {wilson} | R Documentation |
Method for pca creation.
Description
Method for pca creation.
Usage
create_pca(
data,
color.group = NULL,
color.title = NULL,
palette = NULL,
shape.group = NULL,
shape.title = NULL,
shapes = c(15:25),
dimension.a = 1,
dimension.b = 2,
dimensions = 6,
on.columns = TRUE,
labels = FALSE,
custom.labels = NULL,
pointsize = 2,
labelsize = 3,
width = 28,
height = 28,
ppi = 72,
scale = 1
)
Arguments
data |
data.table from which the plot is created (First column will be handled as rownames if not numeric). |
color.group |
Vector of groups according to samples (= column names). |
color.title |
Title of the color legend. |
palette |
Vector of colors used for color palette. |
shape.group |
Vector of groups according to samples (= column names). |
shape.title |
Title of the shape legend. |
shapes |
Vector of shapes see |
dimension.a |
Number of dimension displayed on X-Axis. |
dimension.b |
Number of dimension displayed on Y-Axis. |
dimensions |
Number of dimensions to create. |
on.columns |
Boolean perform pca on columns or rows. |
labels |
Boolean show labels. |
custom.labels |
Vector of custom labels. Will replace columnnames. |
pointsize |
Size of the data points. |
labelsize |
Size of texts inside plot (default = 3). |
width |
Set the width of the plot in cm (default = 28). |
height |
Set the height of the plot in cm (default = 28). |
ppi |
Pixel per inch (default = 72). |
scale |
Modify plot size while preserving aspect ratio (Default = 1). |
Details
If width and height are the same axis ratio will be set to one (quadratic plot).
Width/ height limit = 500. If exceeded default to 500 and issue exceed_size = TRUE.
Value
A named list(plot = ggplot object, data = pca.data, width = width of plot (cm), height = height of plot (cm), ppi = pixel per inch, exceed_size = Boolean whether width/ height exceeded max).