View source: R/getMolecularFm.R
getMolecularFm | R Documentation |
The function "getMolecularFm" outputs the chemical molecular formula of a drug or compound . The results can be visualized by the "plot" function.
getMolecularFm(drugid = NULL, drugname = NULL,sdfSET,main = "", sub = "")
drugid |
A character string of DrugBank ID. |
drugname |
A character string of drug name. |
sdfSET |
Sdf data of drug structure. |
main |
An overall title for the chemical structure graph. |
sub |
A sub title for the chemical structure graph. |
Chemical molecular formula of the drug or compound.
#"sdfSET" has been uploaded to the
#github repository.Users can download and install through "install_github"
#function and set parameter url="hanjunwei-lab/DRviaSPCNData".
#After installing and loading package "DRviaSPCNData",
#users can use the following command to get the data.
# Obtain molecular formula and visualize it.
#Get the sdf data of drug structure from DRviaSPCNData package
#library("Chemminer")
#sdf<-GetData('sdfSET')
#Run the function
#Mole_formula<-getMolecularFm(drugname ="methotrexate",sdfSET=sdf)
#plot(Mole_formula)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.