Load libraries

library(pavo)        #for spec processing
library(tidyverse)   #for data processing, put last to avoid function masking

load data

data_raw <- read.csv("swatches_RAW_300-700.csv",
                 
                 # to avoid reading errors
                 fileEncoding="UTF-8-BOM", na.strings = "")

specs <- as.rspec(data_raw, whichwl = "wl")

Exploration and smoothing

explorespec(specs, by=3, lwd=2, ylim = c(0,100))
## Warning in explorespec(specs, by = 3, lwd = 2, ylim = c(0, 100)): by is not a
## factor of the number of column in rspecdata