Learn R Programming

rPDBapi (version 2.1.1)

ContainsWordsOperator: 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)

Value

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

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.

Examples

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

Run the code above in your browser using DataLab