Skip to contents

Transform a molecular formula

Usage

transformMF(
  MF,
  transformation = "M - [O] + [NH2]",
  transformation_rules_table = transformation_rules()
)

Arguments

MF

molecular formula to transform

transformation

transformation to apply

transformation_rules_table

transformations table containing available transformations rules. Defaults to transformation_rules().

Value

A transformed molecular formula.

Details

NA will be returned if the molecular formula cannot be transformed.

Examples

transformMF('C4H5O5')
#> [1] "C4H7NO4"
transformMF('C4H5N',transformation = 'M - [OH] + [NH2]')
#> [1] NA