grepSDFset {ChemmineR} | R Documentation

## 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

### Details

...

### 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"`

### Author(s)

Thomas Girke

### References

...

### See Also

Class: `SDFset`

### Examples

    ## 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")

[Package ChemmineR version 3.46.0 Index]