Last chance! 50% off unlimited learning
Sale ends in
weights = "sv"
.
It uses the radviz
function, optional arguments for radviz
can be specified.
svd.radial(svd.obj, r = NULL, weights = NULL, group = NULL, alpha = 1, ...)
u
, d
, and v
corresponding to left singular vector, singular values, and right singular vectors, respectively. Alternatively, supply singular vectors, v
.r
vectors in visualization. If not specified, all vectors available in svd.obj$v
are visualized.r
. If "sv", singular values contained in svd.obj$d[1:r]
are used.n
, specifying groups (e.g., phenotypes or conditions for n
samples).radviz
.svd.radial
creates and draws a figure, which is a ggplot
object.
set.seed(1234)
dat = matrix(rnorm(1000), 100, 10)
svd.obj = svd(dat)
colnames(svd.obj$v) = paste0("V",1:10)
rownames(svd.obj$v) = paste0("Sample",1:10)
svd.radial(dat, group=c(rep("Group1",5), rep("Group2",5)))
Run the code above in your browser using DataLab