pcScatter: Create a scatter plot between two eigen vectors colored by a...

Description Usage Arguments Value See Also

Description

This function combines eigen vectors with the metadata, creates a scatter plot (ggplot2 graphics) between two eigenvectors and colors the points by a variable present in the metadata. The metadata and the matrix of the eigen vectors are matched by row names.

Usage

1
pcScatter(eigens, metadata, pc.to.plot, variable, title = NULL)

Arguments

eigens

a matrix with the eigen vectors

metadata

a data frame with the variable of interest (points color), must have row and column names

pc.to.plot

a numeric vector with two elements indicating which two eigen vectors should be used for a scatter plot

variable

a string indicating a name of the variable in the metadata by which the points of the scatter plot should be colored

title

string for the plot title. Default is NULL - no plot title

Value

plot

ggplot2 plot object

eigen.meta

data frame of the metadata merged with the matrix of the eigen vectors

See Also

fs


moosik/snorm documentation built on May 23, 2019, 6:11 a.m.