plotland {RRmorph}R Documentation

Plot landmarks importance on 3d mesh

Description

The function relates PCA loadings of a single PC axis to individual landmarks and plots them on a 3d mesh by means of interpolation.

Usage

plotland(pca,sel=1,refsur=NULL,refmat=NULL,k=5,pal=NULL,
  defo=FALSE,radius=0.001)

Arguments

pca

the result of a relative warp analysis. Classes relwarps and nosymproc are supported.

sel

numeric indicating the focal RW/PC axis.

refsur

the mesh3d object to plot on. If NULL, the mesh is reconstructed by means of vcgBallPivoting from the consensus configuration derived from pca.

refmat

the landmark set related to refsur. If NULL, the consensus configuration derived from pca is used.

k

the argument k passed to interpolMesh.

pal

a vector of colors to be passed to colorRampPalette.

defo

when refsur and refmat are provided, defo = TRUE warps refsur on the consensus shape.

radius

argument radius passed to spheres3d

Value

A list including a mesh3d object colored according to landmarks importance and a matrix of landmarks importance on each RW/PC axis. Additionally, the function returns a 3d plot of the mesh.

Author(s)

Marina Melchionna, Silvia Castiglione, Carmela Serio, Giorgia Girardi

Examples

  
  da<-"https://github.com/pasraia/RRmorph_example_data/raw/refs/heads/main/RRmorphdata.rda"
  download.file(url=da,destfile = paste0(tempdir(),"/RRmorphdata.rda"))
  load(paste0(tempdir(),"/RRmorphdata.rda"))

  require(rgl)
  require(Morpho)

  pca<-procSym(endo.set)
  ldm<-endo.set[,,"Homo_sapiens"]
  sur<-endo.sur[["Homo_sapiens"]]

  plotland(pca=pca,sel=1,refsur = sur,refmat = ldm)
  

[Package RRmorph version 0.0.1 Index]