datablock2ma {ChemmineR} | R Documentation

## SDF data blocks to matrix

### Description

Convert data blocks in `SDFset` to character matrix with `datablock2ma`, then store its numeric columns as numeric matrix and its character columns as character matrix.

### Usage

    datablock2ma(datablocklist, cleanup = " \\(.*", ...)

    splitNumChar(blockmatrix)

### Arguments

`datablocklist` | `list` of data block vectors; can be created with `datablock(sdfset)`
`blockmatrix` | `matrix` returned by `datablock2ma`
`cleanup` | `character` pattern to be used to clean up the name fields of the data block vectors; the exact pattern matches are replaced by nothing (deleted).
`...` | option to pass on additional arguments

### Details

...

### Value

`datablock2ma` | `character matrix`
`splitNumChar` | `list` with two components, a numeric matrix and a character matrix

### Author(s)

Thomas Girke

### References

...

### See Also

Classes: `SDFset`

### Examples

    ## SDFset instance
    data(sdfsample)
    sdfset <- sdfsample

    # Convert data block to matrix
    blockmatrix <- datablock2ma(datablocklist=datablock(sdfset))
    blockmatrix[1:4, 1:4]

    # Split matrix to numeric matrix and character matrix
    numchar <- splitNumChar(blockmatrix=blockmatrix)
    names(numchar)
    numchar[[1]][1:4,]
    numchar[[2]][1:4,]

[Package ChemmineR version 3.40.0 Index]