Skip to contents

Identifies molecular weight for the specified element based on the element's name, its symbol, or its atomic number. Returns only the molecular weight as a numeric value.

Usage

molec_wt(element = NULL)

Arguments

element

(character/numeric) element name, symbol, or atomic number for which to retrieve molecular weight

Value

(numeric) molecular weight value for the relevant element

Examples

# Identify molecular weight for carbon by name
molec_wt(element = "Carbon")
#> [1] 12.011

# Identify molecular weight for hydrogen by atomic number
molec_wt(element = 1)
#> [1] 1.007