From a7e2c2008699b590325ccd848562881251676faf Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Tue, 19 Feb 2019 20:46:18 +0100 Subject: Fix example --- ChangeLog | 14 ++++++++++++++ docs/reference/chent.html | 4 ++-- inst/examples/octanol.R | 2 +- man/chent.Rd | 2 +- 4 files changed, 18 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 569a151..31a1fcc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +commit 433f66e88d96aaf745116b97d7fdaa6ce2abde30 +Author: Johannes Ranke +Date: 2019-02-19 20:46:18 +0100 + + Fix example + +commit b883e6075bd76f979fbffdb768313665681315a0 +Author: Johannes Ranke +Date: 2019-02-19 20:17:59 +0100 + + Only plot when a Picture object is there + + grConvert is not needed for plotting + commit 95a067f0ed8fb580cc3652acd4c7885eb000244a Author: Johannes Ranke Date: 2019-02-19 18:55:27 +0100 diff --git a/docs/reference/chent.html b/docs/reference/chent.html index e2853cc..369b0a0 100644 --- a/docs/reference/chent.html +++ b/docs/reference/chent.html @@ -159,9 +159,9 @@ configured for use with PythonInR

#> PubChem synonyms (up to 10): #> [1] "957" "1-octanol" "Octan-1-ol" "octanol" #> [5] "111-87-5" "N-octanol" "Capryl alcohol" "Octyl alcohol" -#> [9] "caprylic alcohol" "n-Octyl alcohol"
if (!is.null(caffeine$Picture)) { +#> [9] "caprylic alcohol" "n-Octyl alcohol"
if (!is.null(oct$Picture)) { plot(oct) -}
#> Error in eval(expr, envir, enclos): Objekt 'caffeine' nicht gefunden
caffeine <- chent$new("caffeine")
#> PubChem:
#> https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/name/cids/JSON
#> https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/cid/property/MolecularFormula,MolecularWeight,CanonicalSMILES,IsomericSMILES,InChI,InChIKey,IUPACName,XLogP,TPSA,Complexity,Charge,HBondDonorCount,HBondAcceptorCount/JSON
#> https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/cid/synonyms/JSON
#> Trying to get chemical information from RDKit using PubChem_Canonical SMILES +}
caffeine <- chent$new("caffeine")
#> PubChem:
#> https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/name/cids/JSON
#> https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/cid/property/MolecularFormula,MolecularWeight,CanonicalSMILES,IsomericSMILES,InChI,InChIKey,IUPACName,XLogP,TPSA,Complexity,Charge,HBondDonorCount,HBondAcceptorCount/JSON
#> https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/cid/synonyms/JSON
#> Trying to get chemical information from RDKit using PubChem_Canonical SMILES #> CN1C=NC2=C1C(=O)N(C(=O)N2C)C
#> Did not find chyaml file ./caffeine.yaml
print(caffeine)
#> <chent> #> Identifier $identifier caffeine #> InChI Key $inchikey RYYVLZVUVIJVGH-UHFFFAOYSA-N diff --git a/inst/examples/octanol.R b/inst/examples/octanol.R index 8818836..47c2140 100644 --- a/inst/examples/octanol.R +++ b/inst/examples/octanol.R @@ -1,5 +1,5 @@ oct <- chent$new("1-octanol", smiles = "CCCCCCCCO") print(oct) -if (!is.null(caffeine$Picture)) { +if (!is.null(oct$Picture)) { plot(oct) } diff --git a/man/chent.Rd b/man/chent.Rd index 73cb728..29fba70 100644 --- a/man/chent.Rd +++ b/man/chent.Rd @@ -55,7 +55,7 @@ configured for use with PythonInR} \examples{ oct <- chent$new("1-octanol", smiles = "CCCCCCCCO") print(oct) -if (!is.null(caffeine$Picture)) { +if (!is.null(oct$Picture)) { plot(oct) } caffeine <- chent$new("caffeine") -- cgit v1.2.1