search_and_match: Search and Match Data

View source: R/utils.R

search_and_matchR Documentation

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")

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.

Value

A dataframe with search results.

See Also

extr_pprtv, extr_monograph


extractox documentation built on April 4, 2025, 2:30 a.m.