Visualize columns after dimension reduction

# S4 method for matrix
dimension_reduction(object,
    pch = 16, col = "black", cex = 1, main = NULL,
    method = c("PCA", "MDS", "t-SNE", "UMAP"),
    pc = NULL, control = list(),
    scale_rows = FALSE, nr = 5000,
    internal = FALSE, verbose = TRUE)

Arguments

object

A numeric matrix.

method

Which method to reduce the dimension of the data. MDS uses cmdscale, PCA uses prcomp. t-SNE uses Rtsne. UMAP uses umap.

pc

Which two principle components to visualize

control

A list of parameters for Rtsne or umap.

pch

Ahape of points.

col

Color of points.

cex

Aize of points.

main

Title of the plot.

scale_rows

Whether perform scaling on matrix rows.

nr

If number of matrix rows is larger than this value, random nr rows are used.

internal

Internally used.

verbose

Whether print messages.

Value

Locations of the points.

Author

Zuguang Gu <z.gu@dkfz.de>

Examples

# There is no example
NULL
#> NULL