Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

gl.pcoa.plot.3d

3D interactive plot of the results of a PCoA ordination


Description

This script takes output from the ordination undertaken using gl.pcoa() and plots the individuals in 3D space. The visualisation can be rotated, zoomed in and zoomed out with the mouse to examine the structure.

Usage

gl.pcoa.plot.3d(
  glPca,
  x,
  xaxis = 1,
  yaxis = 2,
  zaxis = 3,
  radius = 8,
  verbose = NULL
)

Arguments

glPca

– name of the glPca object containing the factor scores and eigenvalues [required]

x

– name of the genlight object or fd object from which the PCoA was generated [required]

xaxis

– identify the x axis from those available in the ordination (xaxis <= nfactors) [default 1]

yaxis

– identify the y axis from those available in the ordination (yaxis <= nfactors) [default 2]

zaxis

– identify the z axis from those available in the ordination (zaxis <= nfactors) [default 3]

radius

– size of the points [default 8]

verbose

– verbosity: 0, silent or fatal errors; 1, begin and end; 2, progress log ; 3, progress and results summary; 5, full report [default 2 or as specified using gl.set.verbosity]

Details

The factor scores are taken from the output of gl.pcoa(), an object of class glPca, and the population assignments from the original data file and plots the specimens in a 3D plot.

Axes can be specified from the ordination, provided they are within the range of the nfactors value provided to gl.pcoa().

Value

NULL, plots an interactive 3D plot of the ordination in a separate window

Author(s)

Arthur Georges (Post to https://groups.google.com/d/forum/dartr)

Examples

pcoa <- gl.pcoa(possums.gl, nfactor=5)
gl.pcoa.plot.3d(pcoa, possums.gl, xaxis=1, yaxis=2, zaxis=3)

dartR

Importing and Analysing SNP and Silicodart Data Generated by Genome-Wide Restriction Fragment Analysis

v1.9.6
GPL-2
Authors
Bernd Gruber [aut, cre], Arthur Georges [aut], Jose L. Mijangos [aut], Peter J. Unmack [ctb], Oliver Berry [ctb], Lindsay V. Clark [ctb], Floriaan Devloo-Delva [ctb]
Initial release
2021-04-29

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.