plot.big_SVD.Rd
Plot method for class big_SVD
.
# S3 method for big_SVD plot( x, type = c("screeplot", "scores", "loadings"), nval = length(x$d), scores = c(1, 2), loadings = 1, ncol = NULL, coeff = 1, viridis = TRUE, cols = 2, ... )
x  An object of class 

type  Either

nval  Number of singular values to plot. Default plots all computed. 
scores  Vector of indices of the two PCs to plot. Default plots the first two PCs. If providing more than two, it produces many plots. 
loadings  Indices of PC loadings to plot. Default plots the first vector of loadings. 
ncol  If multiple vector of loadings are to be plotted, this defines the number of columns of the resulting multiplot. 
coeff  Relative size of text. Default is 
viridis  Deprecated argument. 
cols  Deprecated. Use 
...  Not used. 
A ggplot2
object. You can plot it using the print
method.
You can modify it as you wish by adding layers. You might want to read
this chapter
to get more familiar with the package ggplot2.
big_SVD, big_randomSVD and asPlotlyText.
set.seed(1) X < big_attachExtdata() svd < big_SVD(X, big_scale(), k = 10) # screeplots plot(svd) # 3 PCs seems "significant"#> [1] "gg" "ggplot"pop < rep(c("POP1", "POP2", "POP3"), c(143, 167, 207)) library(ggplot2) print(obj2 < obj + aes(color = pop) + labs(color = "Population"))## change the title and the labels of the axes obj3 + ggtitle("Yet another title") + xlab("with an other 'x' label")# Percentage of variance explained by the PCs # See https://github.com/privefl/bigstatsr/issues/83 # dynamic plots, require the package **plotly** if (FALSE) plotly::ggplotly(obj3)