Check that an R object contains the expected data members.
check_spct(x, byref, strict.range, force = FALSE, ...)# S3 method for default
check_spct(x, byref = FALSE, strict.range = NA, force = FALSE, ...)
# S3 method for generic_spct
check_spct(
x,
byref = TRUE,
strict.range = NA,
force = FALSE,
multiple.wl = getMultipleWl(x),
...
)
# S3 method for calibration_spct
check_spct(
x,
byref = TRUE,
strict.range = getOption("photobiology.strict.range", default = FALSE),
force = FALSE,
multiple.wl = getMultipleWl(x),
...
)
# S3 method for raw_spct
check_spct(
x,
byref = TRUE,
strict.range = getOption("photobiology.strict.range", default = FALSE),
force = FALSE,
multiple.wl = getMultipleWl(x),
...
)
# S3 method for cps_spct
check_spct(
x,
byref = TRUE,
strict.range = getOption("photobiology.strict.range", default = FALSE),
force = FALSE,
multiple.wl = getMultipleWl(x),
...
)
# S3 method for filter_spct
check_spct(
x,
byref = TRUE,
strict.range = getOption("photobiology.strict.range", default = FALSE),
force = FALSE,
multiple.wl = getMultipleWl(x),
...
)
# S3 method for solute_spct
check_spct(
x,
byref = TRUE,
strict.range = getOption("photobiology.strict.range", default = FALSE),
force = FALSE,
multiple.wl = getMultipleWl(x),
...
)
# S3 method for reflector_spct
check_spct(
x,
byref = TRUE,
strict.range = getOption("photobiology.strict.range", default = FALSE),
force = FALSE,
multiple.wl = getMultipleWl(x),
...
)
# S3 method for object_spct
check_spct(
x,
byref = TRUE,
strict.range = getOption("photobiology.strict.range", default = FALSE),
force = FALSE,
multiple.wl = getMultipleWl(x),
...
)
# S3 method for response_spct
check_spct(
x,
byref = TRUE,
strict.range = NA,
force = FALSE,
multiple.wl = getMultipleWl(x),
...
)
# S3 method for source_spct
check_spct(
x,
byref = TRUE,
strict.range = getOption("photobiology.strict.range", default = FALSE),
force = FALSE,
multiple.wl = getMultipleWl(x),
...
)
# S3 method for chroma_spct
check_spct(
x,
byref = TRUE,
strict.range = getOption("photobiology.strict.range", default = FALSE),
force = FALSE,
multiple.wl = getMultipleWl(x),
...
)
An R object
logical indicating if new object will be created by reference or
by copy of x
logical indicating whether off-range values result in an
error instead of a warning, NA
disables the test.
logical If TRUE
check is done even if checks are
disabled.
additional param possible in derived methods
numeric Maximum number of repeated w.length entries with same value.
check_spct(default)
: Default for generic function.
check_spct(generic_spct)
: Specialization for generic_spct.
check_spct(calibration_spct)
: Specialization for calibration_spct.
check_spct(raw_spct)
: Specialization for raw_spct.
check_spct(cps_spct)
: Specialization for cps_spct.
check_spct(filter_spct)
: Specialization for filter_spct.
check_spct(solute_spct)
: Specialization for solute_spct.
check_spct(reflector_spct)
: Specialization for reflector_spct.
check_spct(object_spct)
: Specialization for object_spct.
check_spct(response_spct)
: Specialization for response_spct.
check_spct(source_spct)
: Specialization for source_spct.
check_spct(chroma_spct)
: Specialization for chroma_spct.
Other data validity check functions:
check_spectrum()
,
check_w.length()
,
enable_check_spct()
check_spct(sun.spct)
check_spct(sun.spct)
# try(check_spct(-sun.spct))
# try(check_spct((sun.spct[1, "w.length"] <- 1000)))
Run the code above in your browser using DataLab