Learn R Programming

rdian (version 0.1.1)

guardian_and: AND and OR operators for Guardian filters and queries.

Description

guardian_and and guardian_or provide (respectively) the AND and OR logical operators. If you pass them your query terms, it passes them back either separated (so that the Guardian API knows to consider a match to any one term a match) or grouped (so that the API only matches if every term appears).

Usage

guardian_and(...)
guardian_or(...)

Arguments

...
a vector of terms (or several vector of terms)

Value

a single string containing the terms, separated by the AND (,) or OR (|) separators used by the Guardian API.

Examples

Run this code
# Simple AND example
guardian_and("sausage", "mash")

# With ORs
guardian_or("sausage", "mash")

Run the code above in your browser using DataLab