GoreLab / waves

R package for Vis-NIR spectral analysis
https://gorelab.github.io/waves/
Other
6 stars 6 forks source link

plot_spectra() throws error when detect.outliers = F and no alternative title is given #29

Closed jmh579 closed 5 months ago

jmh579 commented 5 months ago

An error is thrown when the code below is run, but it should work without a title.

library(tidyverse)
library(waves)
ikeogu.2017 %>% 
  dplyr::select(sample.id, starts_with("X")) %>% 
  plot_spectra(detect.outliers = FALSE)
Error in plot_spectra(., detect.outliers = FALSE) : 
  object 'plot.title' not found

When the parameter alternative.title is supplied (even with empty quotes), this error does not appear:

library(tidyverse)
library(waves)
ikeogu.2017 %>% 
  dplyr::select(sample.id, starts_with("X")) %>% 
  plot_spectra(detect.outliers = FALSE, alternative.title = "")

image