get_search: GET Search Results for a CAS Registry Number and Other...

View source: R/get_search.R

get_searchR Documentation

GET Search Results for a CAS Registry Number and Other Identifiers

Description

This function performs a query to search for substances based on a CAS Registry Number or other identifiers.

Usage

get_search(q, json = FALSE)

Arguments

q

(Character) The (partial) search term. The following search terms are supported: CAS Registry Number (with or without dashes), SMILES (canonical or isomeric), InChI (with or without the "InChI=" prefix), InChIKey, and name. Searching by name allows use of a trailing wildcard (e.g., car*). All searches are case-insensitive.

json

(Logical) Should the result be returned as JSON? Defaults to FALSE.

Details

The function performs a sanity check on the provided search term and then performs a query. If successful, a list with the available information will be returned.

Value

Returns a list.

Note

When searching for an InChIKey, the prefix "InChIKey=" needs to be added.

Author(s)

Raoul Wolf (https://github.com/RaoulWolf/)

Examples

## Not run: 
q <- "Aspiri*"
get_search(q)

## End(Not run)

RaoulWolf/cccapi documentation built on March 6, 2023, 2:19 p.m.