Title: | Unify Dimensionality Reduction Results |
Version: | 0.0.5 |
Description: | Dimensionality reduction (DR) is widely used in many domain for analyzing and visualizing high-dimensional data. 'tidydr' provides uniform output and is compatible with multiple methods, including 'prcomp', 'mds', 'Rtsne'. etc. |
Imports: | ggfun, ggplot2, grid, rlang, utils |
Suggests: | knitr, rmarkdown, prettydoc, SingleCellExperiment, SummarizedExperiment |
VignetteBuilder: | knitr |
ByteCompile: | true |
License: | Artistic-2.0 |
URL: | https://github.com/YuLab-SMU/tidydr/ |
BugReports: | https://github.com/YuLab-SMU/tidydr/issues |
Encoding: | UTF-8 |
RoxygenNote: | 7.2.3 |
NeedsCompilation: | no |
Packaged: | 2023-03-08 08:44:33 UTC; ygc |
Author: | Guangchuang Yu |
Maintainer: | Guangchuang Yu <guangchuangyu@gmail.com> |
Repository: | CRAN |
Date/Publication: | 2023-03-08 09:20:02 UTC |
List dimensionality reduction methods currently available
Description
This function shows available methods that worked for dr()
function.
Usage
available_methods(method = "all")
Arguments
method |
one of 'data', 'distance' or 'all' (default) |
Value
A character vector of available DR methods
Author(s)
Lang Zhou and Guangchuang Yu
Examples
available_methods()
dr
Description
dimensional reduction
Usage
dr(data, fun, ...)
Arguments
data |
input data |
fun |
function to perform dimensional reduction |
... |
additional parameters passed to 'fun' |
Details
This function call the user-provided function ('fun') to perform dimensional reduction on the input data ('data')
Value
a DrResult object, which contains 'data' (original data), 'drdata' (coordination after dimensionality reduction), eigenvalue (standard deviation explained by each dimension) and stress (evaluate the effect of dimensionality reduction)
Author(s)
Guangchuang Yu
Examples
x = dr(iris[,1:4], prcomp)
autoplot(x, aes(color=.group), metadata=iris$Species)
dr_extract
Description
dr_extract generic
Usage
dr_extract(result)
Arguments
result |
DrResult object |
Value
a list that contains components to construct a 'DrResult' object.
Author(s)
Guangchuang Yu
element_line2
Description
element_line2 for drawing shorten axis lines
Usage
element_line2(
colour = NULL,
size = NULL,
linetype = NULL,
lineend = NULL,
color = NULL,
arrow = NULL,
inherit.blank = FALSE,
id,
xlength = 0.3,
ylength = 0.3,
...
)
Arguments
colour |
line colour |
size |
line size in pts |
linetype |
line type |
lineend |
line end style (round, butt, square) |
color |
aliase to colour |
arrow |
arrow specification, as created by 'grid::arrow()' |
inherit.blank |
whether inherit 'element_blank' |
id |
1 or 2, 1 for axis.line.x.bottom and 2 for axis.line.y.left, only these two axes supported |
xlength |
length of x axis |
ylength |
length of y axis |
... |
additional parameters |
Value
element_line2 object, which is a tailored element_line object
Author(s)
Guangchuang Yu
Objects exported from other packages
Description
These objects are imported from other packages. Follow the links below to see their documentation.
theme_dr
Description
Dimensional reduction scatter plot axis theme
Usage
theme_dr(
xlength = 0.3,
ylength = 0.3,
arrow = grid::arrow(length = unit(0.15, "inches"), type = "closed")
)
Arguments
xlength |
length of x axis |
ylength |
length of y axis |
arrow |
arrow specification, as created by 'grid::arrow()' |
Value
a theme object with shorten axes
Author(s)
Guangchuang Yu
theme_noaxis
Description
theme that remove axis
Usage
theme_noaxis(...)
Arguments
... |
additional theme setting |
Value
a theme object that disable axes
Author(s)
Guangchuang Yu