singular.proportion: Singular Proportion Plot

View source: R/singular.proportion.R

singular.proportionR Documentation

Singular Proportion Plot

Description

Generates a proportion plot for a singular group.

Usage

singular.proportion(
  x,
  r = 1,
  b = 0.025,
  v = 1000,
  w = 1,
  f = 0.5,
  c = "lightskyblue",
  t = "",
  s = FALSE,
  a = TRUE,
  ...
)

Arguments

x

A list of vectors named "s" and "p". The elements of vector "s" (character or numeric) specify the sample. The elements of vector "p" (numeric) specify the proportional abundance within sample "s".

r

Numeric scalar. Radius of plot circle (default = 1).

b

Numeric scalar. Plot radius buffer (proportion; default = 0.025).

v

Numeric scalar. Vertex count of plot circle (default = 1000).

w

Numeric scalar. Line width of outer circle (default = 1).

f

Numeric scalar. Line width of sectors as a proportion of w (default = 0.5).

c

Character string. Fill color of sector proportions (default = "lightskyblue").

t

Character string. Plot title (default = "").

s

Logical value. If FALSE (the default), sort samples alphabetically. If TRUE, sort samples by decreasing proportional abundance.

a

Logical value. If FALSE, proportional abundance is represented by the fraction of filled sector radius to outer sector radius. If TRUE (the default), proportional abundance is represented by the fraction of filled sector area to outer sector area.

...

Additional arguments passed to title.

Details

Produces a pie-chart-like proportion plot without grouping structure. Each sector represents a sample. When a = TRUE (the default), then the proportion of each sector filled with color represents the within-sample proportional abundance. When s = FALSE (the default), then samples are sorted alphabetically and arranged in a clockwise orientation (from angle zero). When s = TRUE, then samples are sorted by decreasing proportional abundance. This plot design is specialized for visualizing proportional abundance data.

Value

No return value.

References

A manuscript describing this plot design is in preparation.

See Also

proportion for grouped proportion plots.

singular.detection for singular detection plots.

Examples


set.seed(1234)
n.samples<-6
data<-list(s=letters[1:n.samples],
           p=stats::rbeta(n=n.samples,
                          shape1=1,shape2=1))
singular.proportion(x=data)


LocaTT documentation built on June 14, 2026, 1:06 a.m.