setSoluteProperties {photobiology} | R Documentation |
Set the "solute.properties" attribute
Description
Function to set by reference the "solute.properties"
attribute of an
existing solute_spct
object.
Usage
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_
)
solute_properties(x) <- value
Arguments
x |
solute_spct A spectrum of coefficients of attenuation. |
solute.properties , value |
a list with fields named |
pass.null |
logical If |
mass |
numeric The mass in Dalton [ |
formula |
character The molecular formula. |
structure |
raster A bitmap of the structure. |
name , solvent.name |
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. |
ID , solvent.ID |
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. |
Details
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.
Value
x
Note
This function alters x
itself by reference and in addition
returns x
invisibly. If x
is not a filter_spct object,
x
is not modified.
See Also
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()
Examples
solute.properties <-
list(formula = c(text = "H2O", html = "H<sub>2</sub>", 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)