Extracts the factor loadings from a glPCA object (generated by gl.pcoa) and plots their distribuion.
gl.report.factorloadings(
pca,
axis = 1,
n.display = 15,
plot.display = TRUE,
plot.theme = theme_dartR(),
plot.colors = NULL,
plot.file = NULL,
plot.dir = NULL,
bins = 25,
verbose = NULL,
...
)
The unchanged genlight object
Name of the glPCA object containing factor loadings [required].
Axis in the ordination used to display the factor loadings [default 1]
Number of loci for which to display factorloadings [default 15]
If TRUE, resultant plots are displayed in the plot window [default TRUE].
Theme for the plot. See Details for options [default theme_dartR()].
List of two color names for the borders and fill of the plots [default c("#2171B5","#6BAED6")].
Name for the RDS binary file to save (base name only, exclude extension) [default NULL]
Directory to save the plot RDS files [default as specified by the global working directory or tempdir()]
Number of bins to display in histograms [default 25].
Verbosity: 0, silent or fatal errors; 1, begin and end; 2, progress log; 3, progress and results summary; 5, full report [default NULL, unless specified using gl.set.verbosity]
Parameters passed to function ggsave, such as width and height, when the ggplot is to be saved.
Custodian: Arthur Georges -- Post to https://groups.google.com/d/forum/dartr
The function extracts the factor loadings for a given axis from a PCA object generated by gl.pcoa and plots their magnitudes. Useful for identifying loci that load high for a given axis.
A color vector can be obtained with gl.select.colors() and then passed to the function with the plot.colors parameter.
Themes can be obtained from in
If a plot.file is given, the ggplot arising from this function is saved as an "RDS" binary file using saveRDS(); can be reloaded with readRDS(). A file name must be specified for the plot to be saved. If a plot directory (plot.dir) is specified, the ggplot binary is saved to that directory; otherwise to the tempdir().
Other matched reports:
gl.mahal.assign()
,
gl.report.bases()
,
gl.report.fstat()
,
gl.report.monomorphs()
pca <- gl.pcoa(testset.gl)
gl.report.factorloadings(pca = pca)
Run the code above in your browser using DataLab