Learn R Programming

ChemmineR (version 2.24.2)

grepSDFset: String search in SDFset

Description

Convenience grep function for string searching in SDFset containers.

Usage

grepSDFset(pattern, x, field = "datablock", mode = "subset", ignore.case = TRUE, ...)

Arguments

pattern
search pattern
x
SDFset
field
delimits search to specific section in SDF; can be header, atomblock, bondblock or datablock
mode
if mode = "index", then the match positions are returned as vector; if mode = "subset", a list with SDF components is returned where every entry has at least one query match
ignore.case
TRUE turns off case sensitivity
...
option to pass on additional arguments

Value

numeric
index vector where the name field contains the component positions in the SDFset and the values the row positions in each sub-component.
list
if mode = "subset"

Details

...

References

...

See Also

Class: SDFset

Examples

Run this code

## Instances of SDFset class
data(sdfsample)
sdfset <- sdfsample

## String Searching in SDFset
q <- grepSDFset("65000", sdfset, field="datablock", mode="subset") 
as(q, "SDFset")
grepSDFset("65000", sdfset, field="datablock", mode="index") 

Run the code above in your browser using DataLab