arrowPlot: PCA before and after arrow plot for harman results

Description Usage Arguments Details Value See Also Examples

View source: R/arrowPlot.R

Description

Generates an arrow plot for an instance of harmanresults. The tail of the arrow is the starting point (original) in principle coordinates, while the arrow head is the new point (corrected) in principle coordinates. It can be observed that on principle components that have undergone correction (codeharmanresults$stats$correction < 1.0), the samples within a batch will be coordinately moved towards 0 on that priciple component.

Usage

1
2
arrowPlot(harmanresults, pc_x = 1, pc_y = 2, colBy = "batch",
  palette = "rainbow", col, length = 0.1, legend = TRUE, ...)

Arguments

harmanresults

an instance of harmanresults.

pc_x

integer, principle component for the plot x dimension.

pc_y

integer, principle component for the plot y dimension.

colBy

string, colour the points by the experimental or batch variable; legal values are expt and batch. The palette function specified in palette is used. This parameter is overridden by col.

palette

string, the function to call to create a vector of contiguous colours with the levels of factor in colBy steps.

col,

colour vector for the points. This parameter overrides palette.

length

length of the arrow heads, default is 0.1.

legend

logical, whether to display a legend on the plot

...

further arguments passed to or from other methods.

Details

Generates a Principle Component plot for an instance of harmanresults. If a vector of colours is supplied via the col argument, then a legend will not be drawn.

Value

None

See Also

harmanresults plot.harmanresults

Examples

1
2
3
4
5
6
library(HarmanData)
data(OLF)
expt <- olf.info$Treatment
batch <- olf.info$Batch
olf.harman <- harman(olf.data, expt, batch)
arrowPlot(olf.harman, pc_x=2, pc_y=3, length=0.2)

Harman documentation built on Nov. 8, 2020, 7:50 p.m.