elco_new_elco | R Documentation |
elco
elco_new_elco
is the constructor function for objects of class elco
. An
object of class elco
is a numeric vector with each element representing a
chemical element content value. It is a subclass of the
quantities::quantities()
class with an additional attribute "el_symbol"
where the respective element symbol is stored.
elco_new_elco(x, el_symbol) elco_drop_elco(x) ## S3 method for class 'elco' print(x, ...)
x |
An object of class |
el_symbol |
A character value representing the symbol for a chemical
element. To check this, |
... |
Additional arguments, will be ignored. |
An object of class elco
. This is identical to x
, but has
an additional attribute "el_symbol"
and an additional class attribute
"elco"
.
Returns the input object x
. Prints its content as side effect.
library(quantities) # store C content value as elco object elco_new_elco( x = quantities::set_quantities(0.42, unit = "mol/g", errors = 0.002), el_symbol = "C" ) print(elco::chno$C)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.