Skip to contents

Function to read the "solute.properties" attribute of an existing solute_spct or a solute_mspct objects.

Usage

getSoluteProperties(x, return.null, ...)

solute_properties(x, return.null, ...)

# S3 method for default
getSoluteProperties(x, return.null = FALSE, ...)

# S3 method for solute_spct
getSoluteProperties(x, return.null = FALSE, ...)

# S3 method for summary_solute_spct
getSoluteProperties(x, return.null = FALSE, ...)

# S3 method for solute_mspct
getSoluteProperties(x, return.null = FALSE, ..., idx = "spct.idx")

Arguments

x

solute_spct A spectrum of coefficients of attenuation.

return.null

logical If true, NULL is returned if the attribute is not set, otherwise the expected list is returned with all fields set to NA.

...

Allows use of additional arguments in methods for other classes.

idx

character Name of the column with the names of the members of the collection of spectra.

Value

a list with fields named "mass", "formula",

"structure", "name" and "ID". If the attribute is not set, and return.null is FALSE, a list with fields set to

NA is returned, otherwise, NULL.

Methods (by class)

  • getSoluteProperties(default): default

  • getSoluteProperties(solute_spct): solute_spct

  • getSoluteProperties(summary_solute_spct): summary_solute_spct

  • getSoluteProperties(solute_mspct): solute_mspct

Note

The method for collections of spectra returns the a tibble with a column of lists.

Examples

solute_properties(water.spct)
#> Name: water, Molar mass (Da): 18.02, Formula: H2O.