plotCircular: Circular plot

Description Usage Arguments Details Author(s) References See Also Examples

View source: R/plotCircular.R

Description

This function creates a circular plot (Batschelet, 1981) showing how mean directional change of GPA coordinates in species of interest is distributed relative the root ancestor. Magnitude of directional change is proportional to the length of ray projecting from a data point.

Usage

1
2
plotCircular(x, ancestor, col.lab, clade, LM, f = c(100, 0.1), sf = 1.5,
  ptscale = 1, tit = NULL)

Arguments

x

a list containing objects that are matrices of average GPA coordinates for a set of species. The names of this x contains should contain the species names

ancestor

a matrix specifying the GPA coordinates of the root ancestor estimated using the fastAnc function in the phytools package

col.lab

a character vector specifying colors for species with matching indices in x

clade

a character vector specifying the species that form a clade of interest; currently supports only two clades

LM

the landmark of interest

f

scaling factors for the magnitude of directional change

sf

shrinking factor for shrink argument in plot.circular from the circular package

ptscale

scaling factor for size of data point on the circle perimeter

tit

title for the circular plot

Details

The arms in the circle are color-annotated according to clade of interest, with their direction and length indicating mean directional and magnitude change in the clades of interest, respectively. The circular plot is a useful complement to the wireframe-lollipop plot produced using shapeEvo, as it shows directional distribution details for all species at the individual landmark level. When used in conjunction with the principal component loadings heat map produced using pcloadhm, it can greatly aid biological interpretation of the principal components. This function depends on the phytools (Revell, 2012) and circular (Agostinelli & Lund, 2013) packages.

Author(s)

Tsung Fei Khang tfkhang@um.edu.my

References

Agostinelli C, Lund U. (2013). R package 'circular': Circular Statistics (version 0.4-7). Available at: https://r-forge.r-project.org/projects/circular.

Batschelet E. (1981). Circular Statistics in Biology. London: Academic Press.

Khang TF, Soo OYM, Tan WB, Lim LHS. (2016). Monogenean anchor morphometry: systematic value, phylogenetic signal, and evolution. PeerJ 4:e1668.

Revell LJ. (2012). phytools: An R package for phylogenetic comparative biology (and other things). Methods in Ecology and Evolution 3:217-223.

See Also

anglecheck, shapeEvo, pcloadhm

Examples

1
2
3
4
5
6
7
8
9
library(circular)

data(va_mean)
data(estimated_ancestral_va)
data(spcolmap)

#the species in the defined clade infects the fish host Liza subviridis (dodger blue color)
plotCircular(va_mean, estimated_ancestral_va, col.lab=spcolmap$color,
clade=spcolmap[spcolmap$host %in% "L.subviridis",]$species, LM=6, tit=6)

Example output

sh: 1: cannot create /dev/null: Permission denied
sh: 1: cannot create /dev/null: Permission denied
Warning messages:
1: In rgl.init(initValue, onlyNULL) : RGL: unable to open X11 display
2: 'rgl_init' failed, running with rgl.useNULL = TRUE 
3: .onUnload failed in unloadNamespace() for 'rgl', details:
  call: fun(...)
  error: object 'rgl_quit' not found 

Attaching package: 'circular'

The following objects are masked from 'package:stats':

    sd, var

monogeneaGM documentation built on May 29, 2017, 9:18 p.m.