A cohesive framework for parsing, analyzing and organizing colour from spectral data.
R
package for the spectral and spatial analysis of color patternspavo
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:
browseVignettes('pavo')
) for detailed examples and discussion.The manuscripts describing the package has been published and are free to access:
> v. 2.0
Maia R., Gruson H., Endler J.A. and White T.E. 2018 pavo 2: new tools for the spectral and spatial analysis of colour in R. bioRxiv. doi: 10.1101/427658
< v. 2.0
Maia R., Eliason C.M., Bitton P.-P., Doucet S.M. and Shawkey M.D. 2013. pavo: an R Package for the analysis, visualization and organization of spectral data. Methods in Ecology and Evolution 4(10):609-613. doi: 10.1111/2041-210X.12069
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:
remotes
package:# install.packages('remotes')remotes::install_github('rmaia/pavo')
$R CMD INSTALL
or, from within R:install.packages(path, type='source', repos=NULL)
reclass
to procimg()
, which allows users to interactively
correct areas within images that have been misclassifiedpeakshape()
uses a completely different algorithm to find the FWHM. It now
works as expected for spectra with multiple peaks. See PR #137 for a detailed
overview of the changes.bgandilum
, transmissiondata
, ttvertex
, vissyst
) is no longer exposed to usersis.vismodel()
and is.colspace()
are exported to test whether an object is of class vismodel
or colspace
, respectivelyas.rimg()
pfowl
and avg.v
in vismodel()
and sensdata()
). This removes an unnecessary but harmless warning when colspace()
was used to place quantum catches of such species in the tetrahedral colour space.achro
argument in coldist()
has been changed for achromatic
to
better match the arguments from vismodel()
. Older scripts that use achro
should not be affected and still work as before.imager
is no longer a dependency, and is only loaded if using some
features of procimg()
.mapproj
is no longer a dependency, and is only loaded if using
projplot()
.labels.stack
to plot.rspec
, which allows the use of
custom spectra labels in stacked plots.as.rspec
, and can control the behaviour with the new argument exceed.limits
.as.rspec()
now accepts both numeric and character vectors to identify the wavelength column using whichwl
(eg. whichwl = "wl"
).classify()
can now be specified using either a numeric vector (to identify by image position in a list) or character vector (to identify by image name).aggspec()
when wavelength column was previously removed by the user.cocplot()
would failed whenever type
graphical parameter was specified.spec2rgb()
has been simplified to rely more on vismodel()
. As a result, output values may be slightly different but upon testing, we found that differences between the old and the new version were barely noticeable.getspec()
can now read Avantes binary files (.TRM
files)summary.rspec()
has been fixed to (R700 - R450)/R700.
This gives the same result as before but with a flipped sign, and better reflects
the original formula in the literature.getspec()
has an additional argument ignore.case
set to TRUE
by default
to ignore case in file extension matchinggetspec()
would sometimes fail with files including numbers in
scientific formattetraplot()
to add cone names (u,s,m,l)getspec()
can now read OceanOptics .ProcSpec
filesgetspecf()
(and the argument fast = TRUE
in getspec()
) have been deprecatedsummary.rspec()
returned incorrect values for S7. If you use S7, please re-run
your analysessummary.rspec()
now properly outputs NA
for monotonically decreasing spectrasubset.rspec()
was provided with a logical vectorsummary.colspace()
was used on a tcs objectby
argument in merge.rspec()
is no longer ignoredvoloverlap()
when plot = TRUEvismodel()
when transmission has more than one columnvismodel()
that applied von Kries correction to achromatic channelfill=FALSE
in voloverlap()
jndplot()
when suppressing the plotting of arrowscoldist()
when noise = "quantum"
and achro = TRUE
were usedjndplot()
when arrow = "none"
and achro = TRUE
spec2rgb()
now takes into account the 390-400 nm wavelength range into
account when possibleas.rspec()
no longer fails with tibblesprocspec()
now works for all values of binscolspace()
where it would incorrectly infer a preference for
a general trichromatic space, when a cie model is more appropriatebootcoldist()
uses bootstrap to calculate the confidence intervals on
the mean color distance between samplescoldist()
when fewer samples than the number of photoreceptorsgetspec()
that would cause it to crash with errorstetraplot()
when saving images