Learn R Programming

extractox (version 1.2.0)

search_and_match: Search and Match Data

Description

This function searches for matches in a dataframe based on a given list of ids and search type, then combines the results into a single dataframe, making sure that NA rows are added for any missing ids. The column query is a the end of the dataframe.

Usage

search_and_match(dat, ids, search_type, col_names, chemical_col = "chemical")

Value

A dataframe with search results.

Arguments

dat

The dataframe to be searched.

ids

A vector of ids to search for.

search_type

The type of search: "casrn" or "name".

col_names

Column names to be used when creating a new dataframe in case of no matches.

chemical_col

The name of the column in dat where chemical names are stored.

Details

This function is used in extr_pprtv and extr_monograph.

See Also

extr_pprtv, extr_monograph