get_sdf | R Documentation |
This function sends a request to PubChem to retrieve data in SDF format based on the specified parameters. It then saves the retrieved data as an SDF file in the current working directory (or into the system-specific temporary folder).
get_sdf(
identifier,
namespace = "cid",
domain = "compound",
operation = NULL,
searchtype = NULL,
path = NULL,
file_name = NULL,
options = NULL
)
identifier |
A vector of compound identifiers, either numeric or character.
The type of identifier depends on the |
namespace |
A character string specifying the namespace of the identifier. Possible values include: - - - - - - - Other namespaces as specified in the API documentation. For more details, see the Input section of the PUG REST API. |
domain |
A character string specifying the domain of the query. Possible values include: - - Other domains as specified in the API documentation. |
operation |
A character string specifying the operation to perform.
For SDF retrieval, the operation is typically |
searchtype |
An optional character string specifying the search type. Possible values include: - - - - - Other search types as specified in the API documentation. If For more details, see the Input section of the PUG REST API. |
path |
A character string specifying the directory path where the SDF file will be saved.
If |
file_name |
A character string specifying the name of the SDF file (without file extension).
If |
options |
A list of additional options for the request.
Available options depend on the specific request and the API.
If |
The PubChem PUG REST API allows users to retrieve compound data in various formats, including SDF. This function constructs the appropriate API call and saves the SDF data to a file. For more detailed information, please refer to the PubChem PUG REST API documentation.
The function saves the retrieved data as an SDF file in the current working directory and prints a message indicating the file's location.
get_sdf(
identifier = "aspirin",
namespace = "name",
path = NULL
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.