Learn R Programming

scicomptools (version 1.1.1)

molec_wt: Identify Molecular Weight for a Given Element

Description

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)

Value

(numeric) molecular weight value for the relevant element

Arguments

element

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

Examples

Run this code
# Identify molecular weight for carbon by name
molec_wt(element = "Carbon")

# Identify molecular weight for hydrogen by atomic number
molec_wt(element = 1)

Run the code above in your browser using DataLab