trans_id: trans_id

View source: R/trans_id.R

trans_idR Documentation

trans_id

Description

Translate chemical identifiers from one to the other.

Usage

trans_id(x, from = "CAS", to = "InChIKey",
  odor_data = door_default_values("odor"))

Arguments

x

character vector, one or many chemical identifiers

from

character, the type of identifier to translate from (one of the column names of “odor“)

to

character, the type of identifier to translate from (one of the column names of “odor“)

odor_data

the data frame containing the odor information (defaults to “odor“).

Value

character vector of translated chemical identifiers

Examples

# load data
library(DoOR.data)

# transform CAS to InChIKey
trans_id("123-92-2")

# transform Name to InChIKey
trans_id("isopentyl acetate", "Name")

# transform SMILE to InChIKey
trans_id("C(C(C)C)COC(=O)C", "SMILES", "Name")


ropensci/DoOR.functions documentation built on Feb. 22, 2024, 9:44 a.m.