ContainsWordsOperator: Create a Contains Words Search Operator

View source: R/TextOperators.R

ContainsWordsOperatorR Documentation

Create a Contains Words Search Operator

Description

Constructs a 'ContainsWordsOperator' object for search operations that look for attributes containing specific words. This operator is particularly useful for text-based searches where the goal is to find entries that include particular keywords or phrases within a specified attribute.

Usage

ContainsWordsOperator(attribute, value)

Arguments

attribute

The attribute to be evaluated. This should be the text field within the RCSB PDB that you want to search against.

value

The words to search for in the attribute. This can be a single word or a set of words, and the search will return entries containing any of these words in the specified attribute.

Value

An object of class 'ContainsWordsOperator' that can be used in search queries to retrieve entries where the attribute contains the specified words.

Examples

# Search for entries containing specific words in an attribute
operator <- ContainsWordsOperator(attribute = "rcsb_primary_citation.title",
                                  value = "crystal structure")
print(operator)

rPDBapi documentation built on Oct. 19, 2024, 5:08 p.m.