grepSDFset: String search in 'SDFset'

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

View source: R/AllClasses.R

Description

Convenience grep function for string searching in SDFset containers.

Usage

1
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

1
2
3
4
5
6
7
8
## 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") 

ChemmineR documentation built on May 31, 2017, 12:23 p.m.

Search within the ChemmineR package
Search all R packages, documentation and source code