Running examples in ‘photobiologyLEDs-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: leds.mspct
> ### Title: Spectral irradiance for diverse LEDs
> ### Aliases: leds.mspct
> ### Keywords: datasets
> 
> ### ** Examples
> 
> library(photobiology)
> library(ggspectra)
Loading required package: ggplot2
> 
> names(leds.mspct)
 [1] "BS436"           "CB30"            "LED405"          "LED740"         
 [5] "UV395"           "XSL365"          "XSL370"          "XSL375"         
 [9] "UVMAX340"        "UVMAX305"        "TY_UV310nm"      "white"          
[13] "Q36_4000K"       "G_P30R140A1_XT"  "weili430nm"      "weili540nm"     
[17] "weili665nm"      "weili740nm"      "HPR40E_48K30BG"  "NHXRGB090_R"    
[21] "NHXRGB090_G"     "NHXRGB090_B"     "NHXRGB090"       "B5_436_30D"     
[25] "FR_OLD"          "HLMB_CB30"       "HLMB_CD31_take2" "HLMP_CB31"      
[29] "HLMP_CM30"       "HLMP_CM31"       "HLMP_DJ32"       "HLMP_DL32"      
[33] "LED435_66_60"    "LED740_01AV"     "LY5436"          "QDDH66002"      
[37] "QDDH68002"       "QDDH70002"       "QDDH73502"       "LZ1_10UV00"     
[41] "LZ1_10UA00_U4"   "LZ1_10UA00_U8"   "LZ1_10DB00"      "LZ1_10R302"     
[45] "LZ4_10R208"      "NS6L183AT_H1"    "G_P3V140B1_G"    "G_P3V140B1_GT"  
[49] "G_P3V140A1_YG"   "G_P3V140A1_YG1"  "MTSM340UV_F5120"
> 
> leds.mspct$white
Object: source_spct [1,425 x 2]
Wavelength range 250.05 to 899.78 nm, step 0.43 to 0.48 nm 
Label: White LED from hardware store
supplier Clas Ohlsson, Finland 
Time unit 1s
Spectral data normalized to 1 at 453.47 nm 

# A tibble: 1,425 x 2
   w.length s.e.irrad
      <dbl>     <dbl>
 1     250.         0
 2     251.         0
 3     251          0
 4     251.         0
 5     252.         0
 6     252.         0
 7     253.         0
 8     253.         0
 9     254.         0
10     254.         0
# … with 1,415 more rows
> 
> cat(getWhatMeasured(leds.mspct$white))
White LED from hardware store
supplier Clas Ohlsson, Finland> 
> peaks(leds.mspct$white, span = 100)
span increased to next odd value:  101 
Object: source_spct [2 x 2]
Wavelength range 453.47 to 546.68 nm, step 93.21 nm 
Label: White LED from hardware store
supplier Clas Ohlsson, Finland 
Time unit 1s
Spectral data normalized to 1 at 453.47 nm 

# A tibble: 2 x 2
  w.length s.e.irrad
*    <dbl>     <dbl>
1     453.     1    
2     547.     0.253
> 
> range(leds.mspct$white)
[1] 250.05 899.78
> 
> stepsize(leds.mspct$white)
[1] 0.43 0.48
> 
> plot(leds.mspct$white)
Error in grid.Call.graphics(C_setviewport, vp, TRUE) : 
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
Calls: <Anonymous> ... lapply -> FUN -> push.vp.viewport -> grid.Call.graphics
Execution halted