R: Subtract one chemical formula from another

subform {enviPat} | R Documentation

## Subtract one chemical formula from another

### Description

Subtract one chemical formula from another

### Usage

    subform(formula1,formula2)

### Arguments

`formula1` | Chemical formula to subtract from
`formula2` | Chemical formula to subtract

### Details

Useful for adduct calculations, check `adducts`. Chemical formulas must conform to what is described in `check_chemform`. Prior check if `formula2` is contained in `formula2` at all? See `check_ded`.

### Value

A unified and filtered peaklist

### Author(s)

Martin Loos

### See Also

`adducts`,`check_ded`

### Examples

    formula1<-c("C10[13]C2H10Cl10")
    formula2<-c("C2H5[13]C1")
    subform(formula1,formula2)

[Package enviPat version 2.4 Index]