R/validate.R

.validate <- function (object) {
            ncol <- ncol (object@data$spc)
				
            if (is.null (ncol))
              ncol <- 0
            
			  	if (length (object@wavelength) != ncol)
              return ("Length of wavelength vector differs from number of data points per spectrum.")

            TRUE
          }

Try the hyperSpec package in your browser

Any scripts or data that you put into this service are public.

hyperSpec documentation built on Sept. 13, 2021, 5:09 p.m.