Learn R Programming

pavo

An R package for the spectral and spatial analysis of color patterns

Currently maintained by Thomas White and Hugo Gruson.

About

pavo is an R package developed with the goal of establishing a flexible and integrated workflow for working with spectral and spatial colour data. It includes functions that take advantage of new data classes to work seamlessly from importing raw spectra and images, to visualisation and analysis. It provides flexible ways to input spectral data from a variety of equipment manufacturers, process these data, extract variables, and produce publication-quality figures.

pavo was written with the following workflow in mind:

  • Organise data by importing and processing spectra and images (e.g., to remove noise, negative values, smooth curves, etc.).
  • Analyse the resulting files, using spectral analyses of shape (hue, saturation, brightness), visual models based on perceptual data, and/or spatial adjacency and boundary strength analyses.
  • Visualise the output, with multiple options provided for exploration, presentation, and analysis.

Need more information, or help with the package?

Citing pavo

The manuscript describing the current iteration of the package has been published and is free to access:

Maia R., Gruson H., Endler J.A., and White T.E. 2019 pavo 2: New tools for the spectral and spatial analysis of colour in R. Methods in Ecology and Evolution, 10(7):1097‑1107.

Install

This is the development page for pavo. The stable release is available from CRAN. Simply use install.packages("pavo") to install.

If you want to install the bleeding edge version of pavo, you can:

# install.packages("remotes")
remotes::install_github("rmaia/pavo")
  • download files from GitHub and install using $R CMD INSTALL or, from within R:
install.packages(path, type = "source", repos = NULL)

Copy Link

Version

Install

install.packages('pavo')

Monthly Downloads

928

Version

2.9.0

License

GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Maintainer

Last Published

September 24th, 2023

Functions in pavo (2.9.0)

coldist2mat

Convert coldist to distance matrix
colspace

Model spectra in a colorspace
classify

Identify colour classes in an image for adjacency analyses
coldist

Colour distances
cie

CIE colour spaces
diplot

Plot a dichromat segment
cocplot

Plot the colour opponent coding diagram
dispace

Dichromatic colour space
coc

Color opponent coding model
getimg

Import image data
img_conversion

Convert images between class rimg and cimg or magick-image
flowers

Reflectance spectra from a suite of native Australian flowers, collected around Cairns, Queensland.
explorespec

Plot spectral curves
cieplot

CIE plot
hexplot

Plot a colour hexagon
find_astar

Compute the \(\alpha^*\) value
irrad2flux

Converts between irradiance and photon (quantum) flux
plot.colspace

Plot spectra in a colourspace
is.colspace

Test if object is of class 'colspace'
plot.rimg

Plot unprocessed or colour-classified images
hexagon

Colour hexagon
jndplot

Perceptually-corrected chromaticity diagrams
peakshape

Peak shape descriptors
getspec

Import spectra files
legendtetra

Add legend to a static tetrahedral colourspace
jndrot

Rotate Cartesian coordinates obtained from jnd2xyz()
pavo-package

pavo: Perceptual Analysis, Visualization and Organization of Spectral Colour Data
jnd2xyz

Convert JND distances into perceptually-corrected Cartesian coordinates
is.vismodel

Test if object is of class 'vismodel'
projplot

2D projection of a tetrahedral colourspace
sensdata

Retrieve or plot in-built spectral sensitivity data
segspace

Segment classification
segplot

Plot the segment-analysis model
points.colspace

Plot points in a colourspace
plotsmooth

Plot loess smoothed curves
sicalis

Spectral curves from three body regions of stripe-tailed yellow finch (Sicalis citrina) males
sensmodel

Modeling spectral sensitivity
procspec

Process spectra
summary.vismodel

Visual model summary
procimg

Process images
tcspace

Tetrahedral colourspace
spec2rgb

Spectrum to rgb colour conversion
simulate_spec

Simulate a spectrum
summary.rimg

Image summary
summary.rspec

Colourimetric variables
plot.sensmod

Plot absorbance spectra from sensmodel()
vissyst

Animal visual systems data
subset.rspec

Subset rspec, vismodel, and colspace objects
summary.colspace

Colourspace data summary
plot.rspec

Plot spectra
merge.rspec

Merge two rspec objects
teal

Angle-resolved reflectance data for the iridescent wing patch of a male green-winged teal (Anas carolinensis)
tcsplot

Interactive plot of a tetrahedral colourspace
transmissiondata

Default ocular transmission data
vismodel

Visual models
voloverlap

Colour volume overlap
tetraplot

Plot a static tetrahedral colorspace
vol

Plot a tetrahedral colour space
ttvertex

vertex for the tetrahedral color space
triplot

Plot a Maxwell triangle
trispace

Trichromatic colour space
catplot

Plot the categorical colour vision model
axistetra

Plot reference axes in a static tetrahedral colourspace
categorical

Categorical fly-visual model
as.rimg

Convert data to an rimg object
aggplot

Plot aggregated reflectance spectra
as.rspec

Convert data to an rspec object
aggspec

Aggregate reflectance spectra
bootcoldist

Bootstrap colour distance confidence intervals
adjacent

Run an adjacency and boundary strength analysis
bgandilum

Default background and illuminant data