c.molecule_single: Combine, subset molecule(s) objects

Description Usage Arguments Value Examples

View source: R/molecule.R

Description

Combine, subset molecule(s) objects

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
## S3 method for class 'molecule_single'
c(...)

## S3 method for class 'mol'
c(...)

## S3 method for class 'mol'
x[i, ...]

## S3 replacement method for class 'mol'
x[i] <- value

## S3 replacement method for class 'mol'
x[[i]] <- value

## S3 method for class 'molecule_single'
x[i, ...]

## S3 method for class 'molecule_single'
rep(x, times, ...)

## S3 method for class 'mol'
rep(x, times, ...)

## S3 method for class 'mol'
unique(x, ...)

Arguments

...

Objects to combine

x

A mol object

i

The index to extract

value

Replacement value

times

The number of times to repeat the molecule

Value

A mol object

Examples

1
2
3
c(as_mol("H2O"), as_mol("NH3"))
mols <- as_mol(c("H2O", "NH3"))
mols[1]

paleolimbot/chemr documentation built on Sept. 11, 2021, 2:02 p.m.