Learn R Programming

pcutils (version 0.2.8)

search_browse: Search and browse the web for specified terms

Description

This function takes a vector of search terms, an optional search engine (default is Google), and an optional base URL to perform web searches. It opens the default web browser with search results for each term.

Usage

search_browse(search_terms, engine = "google", base_url = NULL)

Value

No return value

Arguments

search_terms

A character vector of search terms to be searched.

engine

A character string specifying the search engine to use (default is "google"). Supported engines: "google", "bing".

base_url

A character string specifying the base URL for web searches. If not provided, the function will use a default URL based on the chosen search engine.

Examples

Run this code
if (FALSE) {
search_terms <- c(
  "s__Pandoraea_pnomenusa",
  "s__Alicycliphilus_sp._B1"
)

# Using Google search engine
search_browse(search_terms, engine = "google")

# Using Bing search engine
search_browse(search_terms, engine = "bing")
}

Run the code above in your browser using DataLab