Learn R Programming

rPDBapi (version 2.1.1)

ComparisonOperator: Create a Comparison Search Operator

Description

Constructs a `ComparisonOperator` object for search operations that perform comparison checks on attribute values. This operator allows for evaluating attributes using comparison operators such as 'equal', 'greater_than', or 'less_than', making it suitable for numerical and date-based searches.

Usage

ComparisonOperator(attribute, value, comparison_type)

Value

An object of class `ComparisonOperator` that can be used in search queries to retrieve entries where the attribute meets the specified comparison criteria.

Arguments

attribute

The attribute to be compared. This should be the field within the RCSB PDB that you want to evaluate.

value

The value to compare against. This is the reference value for the comparison.

comparison_type

A string specifying the type of comparison (e.g., 'equal', 'greater_than', 'less_than'). Supported comparison types are 'equal', 'not_equal', 'greater_than', 'less_than', etc.

Examples

Run this code
# Search for entries where an attribute equals a specific value
operator <- ComparisonOperator(attribute = "rcsb_entry_info.resolution_combined",
                                value = 2.0, comparison_type = "EQUAL")
operator

Run the code above in your browser using DataLab