diff options
author | Johannes Ranke <jranke@uni-bremen.de> | 2019-02-19 20:17:59 +0100 |
---|---|---|
committer | Johannes Ranke <jranke@uni-bremen.de> | 2019-02-19 20:17:59 +0100 |
commit | b883e6075bd76f979fbffdb768313665681315a0 (patch) | |
tree | cc3f14824db202513bf632f817e8439ae72ae5d8 /inst | |
parent | 95a067f0ed8fb580cc3652acd4c7885eb000244a (diff) |
Only plot when a Picture object is there
grConvert is not needed for plotting
Diffstat (limited to 'inst')
-rw-r--r-- | inst/examples/caffeine.R | 2 | ||||
-rw-r--r-- | inst/examples/octanol.R | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/inst/examples/caffeine.R b/inst/examples/caffeine.R index f5711f3..e886878 100644 --- a/inst/examples/caffeine.R +++ b/inst/examples/caffeine.R @@ -1,5 +1,5 @@ caffeine <- chent$new("caffeine") print(caffeine) -if (requireNamespace("grConvert")) { +if (!is.null(caffeine$Picture)) { plot(caffeine) } diff --git a/inst/examples/octanol.R b/inst/examples/octanol.R index b13d9ce..8818836 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 (requireNamespace("grConvert")) { +if (!is.null(caffeine$Picture)) { plot(oct) } |