aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog14
-rw-r--r--docs/reference/chent.html4
-rw-r--r--inst/examples/octanol.R2
-rw-r--r--man/chent.Rd2
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 <jranke@uni-bremen.de>
+Date: 2019-02-19 20:46:18 +0100
+
+ Fix example
+
+commit b883e6075bd76f979fbffdb768313665681315a0
+Author: Johannes Ranke <jranke@uni-bremen.de>
+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 <jranke@uni-bremen.de>
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</p></dd>
#&gt; PubChem synonyms (up to 10):
#&gt; [1] "957" "1-octanol" "Octan-1-ol" "octanol"
#&gt; [5] "111-87-5" "N-octanol" "Capryl alcohol" "Octyl alcohol"
-#&gt; [9] "caprylic alcohol" "n-Octyl alcohol" </div><div class='input'><span class='kw'>if</span> (!<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/NULL'>is.null</a></span>(<span class='no'>caffeine</span>$<span class='no'>Picture</span>)) {
+#&gt; [9] "caprylic alcohol" "n-Octyl alcohol" </div><div class='input'><span class='kw'>if</span> (!<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/NULL'>is.null</a></span>(<span class='no'>oct</span>$<span class='no'>Picture</span>)) {
<span class='fu'><a href='https://www.rdocumentation.org/packages/graphics/topics/plot'>plot</a></span>(<span class='no'>oct</span>)
-}</div><div class='output co'>#&gt; <span class='error'>Error in eval(expr, envir, enclos): Objekt 'caffeine' nicht gefunden</span></div><div class='input'><span class='no'>caffeine</span> <span class='kw'>&lt;-</span> <span class='no'>chent</span>$<span class='fu'>new</span>(<span class='st'>"caffeine"</span>)</div><div class='output co'>#&gt; <span class='message'>PubChem:</span></div><div class='output co'>#&gt; <span class='message'>https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/name/cids/JSON</span></div><div class='output co'>#&gt; <span class='message'>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</span></div><div class='output co'>#&gt; <span class='message'>https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/cid/synonyms/JSON</span></div><div class='output co'>#&gt; <span class='message'>Trying to get chemical information from RDKit using PubChem_Canonical SMILES</span>
+}</div><div class='input'><span class='no'>caffeine</span> <span class='kw'>&lt;-</span> <span class='no'>chent</span>$<span class='fu'>new</span>(<span class='st'>"caffeine"</span>)</div><div class='output co'>#&gt; <span class='message'>PubChem:</span></div><div class='output co'>#&gt; <span class='message'>https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/name/cids/JSON</span></div><div class='output co'>#&gt; <span class='message'>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</span></div><div class='output co'>#&gt; <span class='message'>https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/cid/synonyms/JSON</span></div><div class='output co'>#&gt; <span class='message'>Trying to get chemical information from RDKit using PubChem_Canonical SMILES</span>
#&gt; <span class='message'>CN1C=NC2=C1C(=O)N(C(=O)N2C)C</span></div><div class='output co'>#&gt; <span class='message'>Did not find chyaml file ./caffeine.yaml</span></div><div class='input'><span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/print'>print</a></span>(<span class='no'>caffeine</span>)</div><div class='output co'>#&gt; &lt;chent&gt;
#&gt; Identifier $identifier caffeine
#&gt; 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")

Contact - Imprint