Description Usage Arguments Details Value Author(s) References See Also Examples
Returns data block(s) from an object of class SDF or SDFset.
1 2 3 | datablock(x)
datablocktag(x, tag)
|
x |
object of class |
tag |
|
...
named character
vector if SDF
is provided or list
of named character
vectors if SDFset
is provided
Thomas Girke
...
atomblock
, atomcount
, bondblock
, header
, cid
, sdfid
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | ## SDF/SDFset instances
data(sdfsample)
sdfset <- sdfsample
sdf <- sdfset[[1]]
## Extract data block
datablock(sdf)
datablock(sdfset[1:4])
datablocktag(sdfset, tag="PUBCHEM_OPENEYE_CAN_SMILES")
## Replacement methods
sdfset[[1]][[1]][1] <- "test"
sdfset[[1]]
datablock(sdfset)[1] <- datablock(sdfset[2])
view(sdfset[1:2])
## Example for injecting a custom matrix/data frame into the data block of an
## SDFset and then writing it to an SD file
props <- data.frame(MF=MF(sdfset), MW=MW(sdfset), atomcountMA(sdfset))
datablock(sdfset) <- props
view(sdfset[1:4])
# write.SDF(sdfset[1:4], file="sub.sdf", sig=TRUE, cid=TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.