Skip to contents

Retrieve detailed compound information using the Metabolomics Workbench registry number.

Usage

get_compound_by_regno(client, regno, fields = "all", format = "json")

Arguments

client

An mw_rest_client object

regno

Character or numeric. Registry number

fields

Character. Fields to return (default: "all")

format

Character. Output format ("json" or "txt")

Value

Tibble with compound information (JSON) or character string (txt)

Examples

if (FALSE) { # \dontrun{
client <- mw_rest_client()

# Get all fields for a compound
compound_info <- get_compound_by_regno(client, "1")

# Get only the name
compound_name <- get_compound_by_regno(client, "1", fields = "name")
} # }