Skip to contents

Retrieve images of substances from ChEMBL and save them in SVG format.

Usage

chembl_img(
  query,
  dir = NULL,
  verbose = getOption("verbose"),
  test_service_down = FALSE
)

Arguments

query

character; a vector of ChEMBL IDs.

dir

character; the directory in which to save the image(s). If the directory does not exist, it will be created. If `NULL` (default), the working directory will be used.

verbose

logical; should verbose messages be printed to the console?

test_service_down

logical; for internal testing only.

Value

Creates the download directory if needed and downloads one or more SVG files.

Examples

if (FALSE) { # \dontrun{
# download a single image
chembl_img("CHEMBL1")
# download a single image to another directory
chembl_img("CHEMBL1", dir = tempdir())
# download multiple images
chembl_img(c("CHEMBL1", "CHEMBL2"))
} # }