
Function to set by reference the "solute.properties"
attribute of an
existing solute_spct
object.
setSoluteProperties(
x,
solute.properties = NULL,
pass.null = FALSE,
mass = NA_real_,
formula = NULL,
structure = grDevices::as.raster(matrix()),
name = NA_character_,
ID = NA_character_,
solvent.name = NA_character_,
solvent.ID = NA_character_,
verbose = TRUE
)solute_properties(x) <- value
x
solute_spct A spectrum of coefficients of attenuation.
a list with fields named "mass"
,
"formula"
, "structure"
, "name"
and "ID"
.
logical If TRUE
, the parameters to the next three
parameters will be always ignored, otherwise they will be used to
build an object of class "solute.properties"
when the argument to
solute.properties
is NULL
.
numeric The mass in Dalton [
character The molecular formula.
raster A bitmap of the structure.
character The name of the substance and the name of the solvent. A named character vector, with member names such as "IUPAC" for the authority.
character The names of the substance and of the solvent. A named character vector, with member names such as "ChemSpider" or "PubChen" for the authority.
logical Flag to enable warning when applied to object of unsuported class.
Storing solute properties allows inter-conversion between bases of
expression, and ensures the unambiguous identification of the substances to
which the spectral data refer. These properties make it possible to compute
filter_spct
objects for solutions of the solute, i.e., absorption
spectra of liquid filters. The parameter pass.null
makes it possible
to remove the attribute. The solvent used for the determination of the
attenuation coefficient is important metadata as the solvent can alter
the spectral ansorption properties of the solute.
Other measurement metadata functions:
add_attr2tb()
,
getFilterProperties()
,
getHowMeasured()
,
getInstrDesc()
,
getInstrSettings()
,
getSoluteProperties()
,
getWhatMeasured()
,
getWhenMeasured()
,
getWhereMeasured()
,
get_attributes()
,
isValidInstrDesc()
,
isValidInstrSettings()
,
select_spct_attributes()
,
setFilterProperties()
,
setHowMeasured()
,
setInstrDesc()
,
setInstrSettings()
,
setWhatMeasured()
,
setWhenMeasured()
,
setWhereMeasured()
,
spct_attr2tb()
,
spct_metadata()
,
subset_attributes()
,
trimInstrDesc()
,
trimInstrSettings()
solute.properties <-
list(formula = c(text = "H2O", html = "H2", TeX = "$H_2O$"),
name = c("water", IUPAC = "oxidane"),
structure = grDevices::as.raster(matrix()),
mass = 18.015, # Da
ID = c(ChemSpider = "917", CID = "962"),
solvent.name = NA_character_,
solvent.ID = NA_character_)
my.spct <- solute_spct()
solute_properties(my.spct) <- solute.properties
solute_properties(my.spct)
solute_properties(my.spct) <- NULL
solute_properties(my.spct)
solute_properties(my.spct, return.null = TRUE)
solute_properties(my.spct)
Run the code above in your browser using DataLab