Learn R Programming

rcdk (version 3.1.8.1)

view.table: View 2D Structures With Data

Description

The CDK is capable of generating 2D structure diagrams. This function can be used to view a set of molecules along with some associated data. The format of the output is a table, where the first column are the 2D images of the molecules, followed by the data columns.

Usage

view.table(molecules, dat, cellx = 200, celly = 200)

Arguments

molecules
A list of jobRef objects that represent IAtomContainer
dat
A data.frame containing numeric or character columns. If columns are named they will be used in the data table. If not, names are autogenerated. The number of rows of the data.frame should be equal to the number of molecules
cellx
Initial width of the table cells
celly
Initial height of the table cells

Value

  • Nothing

Details

Due to event handling issues, the depiction will show on OS X, but the window will be unresponsive. The depictions will work fine on Linux and Windows.

See Also

view.molecule.2d

Examples

Run this code
smiles <- c('CCC', 'CCN', 'CCN(C)(C)',
            'c1ccccc1Cc1ccccc1',
            'C1CCC1CC(CN(C)(C))CC(=O)CC')
mols <- parse.smiles(smiles)
dframe <- data.frame(x = runif(4),
                     toxicity = factor(c('Toxic', 'Toxic', 'Nontoxic', 'Nontoxic')),
                     solubility = c('yes', 'yes', 'no', 'yes'))
view.table(mols[1:4], dframe)

Run the code above in your browser using DataLab