datablock2ma: SDF data blocks to matrix

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/AllClasses.R

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

1
2
3
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## 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,] 

ChemmineR documentation built on Feb. 28, 2021, 2:02 a.m.