Search Patterns

James Joseph Balamuta

2024-02-03

Introduction

When trying to solve a problem, part of the process is to research what attempts have been made by others. The most common form of research is to query a search portal. One downside to this approach is that each search portal has its own set of operators or query phrasing that will yield relevant content. As a result, those that have domain knowledge are able to format the search query in a way that is better. Still many queries are not constrained enough to the programming language being used. The goal of searcher is to attempt to address both needs by providing a convenient pre-specified search interface that tailors the results to R.

Usage

To begin using searcher, first install the package from CRAN.

# Install the searcher package if not already installed
install.packages("searcher")

Once installed, searching with searcher is done by using one or more of the search_*() functions. To access these functions, either use a namespace function call of searcher::search_*() or load the searcher package and, then, call the function.

# Loads the searcher package
library("searcher")

# Searches using Google for `tips`
search_google("tips")

Search Operators

Within the searcher package, each search_*() function has the parameter of rlang = TRUE. By default, this enforces a search that guarantees R-specific results. If rlang = FALSE, then the results are generalized.

General Search Tips

To improve your R-related search query, it has been suggested to use:

Suggestions here were pooled from discussion on rOpenSci’s slack with Steph Locke and Robert Mitchell.