diff options
Diffstat (limited to 'docs/reference')
28 files changed, 1779 insertions, 450 deletions
diff --git a/docs/reference/Rplot001.png b/docs/reference/Rplot001.png Binary files differindex ec5af46..0e4970e 100644 --- a/docs/reference/Rplot001.png +++ b/docs/reference/Rplot001.png diff --git a/docs/reference/chent-1.png b/docs/reference/chent-1.png Binary files differindex 9049a55..1e8885d 100644 --- a/docs/reference/chent-1.png +++ b/docs/reference/chent-1.png diff --git a/docs/reference/chent.html b/docs/reference/chent.html index a70e318..13ad23e 100644 --- a/docs/reference/chent.html +++ b/docs/reference/chent.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>An R6 class for chemical entities with associated data — chent • chents</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.4.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.4.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="An R6 class for chemical entities with associated data — chent"><meta name="description" content="The class is initialised with an identifier. Chemical +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>An R6 class for chemical entities with associated data — chent • chents</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="An R6 class for chemical entities with associated data — chent"><meta name="description" content="The class is initialised with an identifier. Chemical information is retrieved from the internet. Additionally, it can be generated using RDKit if RDKit and its python bindings are installed."><meta property="og:description" content="The class is initialised with an identifier. Chemical information is retrieved from the internet. Additionally, it can be @@ -11,7 +11,7 @@ generated using RDKit if RDKit and its python bindings are installed."></head><b <a class="navbar-brand me-2" href="../index.html">chents</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.3.6</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.4.2</small> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> @@ -46,7 +46,7 @@ generated using RDKit if RDKit and its python bindings are installed.</p> <div class="section level2"> <h2 id="format">Format<a class="anchor" aria-label="anchor" href="#format"></a></h2> - <p>An <code>R6Class</code> generator object</p> + <p>An <a href="https://r6.r-lib.org/reference/R6Class.html" class="external-link">R6Class</a> generator object</p> </div> <div class="section level2"> <h2 id="public-fields">Public fields<a class="anchor" aria-label="anchor" href="#public-fields"></a></h2> @@ -55,88 +55,84 @@ generated using RDKit if RDKit and its python bindings are installed.</p> The identifier that was used to initiate the object, with attribute 'source'</p></dd> -<dt><code>inchikey</code></dt> + <dt><code>inchikey</code></dt> <dd><p>(<code>character(1)</code>)<br> InChI Key, with attribute 'source'</p></dd> -<dt><code>smiles</code></dt> + <dt><code>smiles</code></dt> <dd><p>(<code><a href="https://rdrr.io/r/base/character.html" class="external-link">character()</a></code>)<br> SMILES code(s), with attribute 'source'</p></dd> -<dt><code>mw</code></dt> + <dt><code>mw</code></dt> <dd><p>(<code>numeric(1)</code>)<br> Molecular weight, with attribute 'source'</p></dd> -<dt><code>pubchem</code></dt> + <dt><code>pubchem</code></dt> <dd><p>(<code><a href="https://rdrr.io/r/base/list.html" class="external-link">list()</a></code>)<br> List of information retrieved from PubChem</p></dd> -<dt><code>rdkit</code></dt> + <dt><code>rdkit</code></dt> <dd><p>List of information obtained with RDKit</p></dd> -<dt><code>mol</code></dt> + <dt><code>mol</code></dt> <dd><p><rdkit.Chem.rdchem.Mol> object</p></dd> -<dt><code>svg</code></dt> + <dt><code>svg</code></dt> <dd><p>SVG code</p></dd> -<dt><code>Picture</code></dt> -<dd><p>Graph as a <code>picture</code> object obtained using grImport</p></dd> + <dt><code>Picture</code></dt> +<dd><p>Graph as a <a href="https://rdrr.io/pkg/grImport/man/Picture-class.html" class="external-link">grImport::Picture</a> object obtained using the grImport package</p></dd> -<dt><code>Pict_font_size</code></dt> + <dt><code>Pict_font_size</code></dt> <dd><p>Font size as extracted from the intermediate PostScript file</p></dd> -<dt><code>pdf_height</code></dt> + <dt><code>pdf_height</code></dt> <dd><p>Height of the MediaBox in the pdf after cropping</p></dd> -<dt><code>p0</code></dt> + <dt><code>p0</code></dt> <dd><p>Vapour pressure in Pa</p></dd> -<dt><code>cwsat</code></dt> + <dt><code>cwsat</code></dt> <dd><p>Water solubility in mg/L</p></dd> -<dt><code>PUF</code></dt> + <dt><code>PUF</code></dt> <dd><p>Plant uptake factor</p></dd> -<dt><code>chyaml</code></dt> + <dt><code>chyaml</code></dt> <dd><p>List of information obtained from a YAML file</p></dd> -<dt><code>TPs</code></dt> -<dd><p>List of transformation products as chent objects -Add a transformation product to the internal list</p></dd> + <dt><code>TPs</code></dt> +<dd><p>List of transformation products as chent objects</p></dd> -<dt><code>transformations</code></dt> -<dd><p>Data frame of observed transformations -Add a line in the internal dataframe holding observed transformations</p></dd> + <dt><code>transformations</code></dt> +<dd><p>Data frame of observed transformations</p></dd> -<dt><code>soil_degradation</code></dt> -<dd><p>Dataframe of modelling DT50 values -Add a line in the internal dataframe holding modelling DT50 values</p></dd> + <dt><code>soil_degradation</code></dt> +<dd><p>Dataframe of modelling DT50 values</p></dd> -<dt><code>soil_ff</code></dt> + <dt><code>soil_ff</code></dt> <dd><p>Dataframe of formation fractions</p></dd> -<dt><code>soil_sorption</code></dt> -<dd><p>Dataframe of soil sorption data -Add soil sorption data</p></dd> + <dt><code>soil_sorption</code></dt> +<dd><p>Dataframe of soil sorption data</p></dd> </dl><p></p></div> @@ -146,8 +142,7 @@ Add soil sorption data</p></dd> <div class="section"> <h3 id="public-methods">Public methods<a class="anchor" aria-label="anchor" href="#public-methods"></a></h3> - -<ul><li><p><a href="#method-chent-new"><code>chent$new()</code></a></p></li> +<p></p><ul><li><p><a href="#method-chent-initialize"><code>chent$new()</code></a></p></li> <li><p><a href="#method-chent-try_pubchem"><code>chent$try_pubchem()</code></a></p></li> <li><p><a href="#method-chent-get_pubchem"><code>chent$get_pubchem()</code></a></p></li> <li><p><a href="#method-chent-get_rdkit"><code>chent$get_rdkit()</code></a></p></li> @@ -164,8 +159,8 @@ Add soil sorption data</p></dd> <li><p><a href="#method-chent-png"><code>chent$png()</code></a></p></li> <li><p><a href="#method-chent-emf"><code>chent$emf()</code></a></p></li> <li><p><a href="#method-chent-clone"><code>chent$clone()</code></a></p></li> -</ul></div><p></p><hr><a id="method-chent-new"></a><div class="section"> -<h3 id="method-new-">Method <code>new()</code><a class="anchor" aria-label="anchor" href="#method-new-"></a></h3> +</ul></div><p></p><hr><a id="method-chent-initialize"></a><div class="section"> +<h3 id="chent-new-"><code>chent$new()</code><a class="anchor" aria-label="anchor" href="#chent-new-"></a></h3> <p>Creates a new instance of this <a href="https://r6.r-lib.org/reference/R6Class.html" class="external-link">R6</a> class.</p><div class="section"> <h4 id="usage">Usage<a class="anchor" aria-label="anchor" href="#usage"></a></h4> <p></p><div class="r"><div class="sourceCode"><pre><code><span><span class="va"><a href="../reference/chent.html">chent</a></span><span class="op">$</span><span class="fu">new</span><span class="op">(</span></span> @@ -176,214 +171,182 @@ Add soil sorption data</p></dd> <span> pubchem_from <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"name"</span>, <span class="st">"smiles"</span>, <span class="st">"inchikey"</span><span class="op">)</span>,</span> <span> rdkit <span class="op">=</span> <span class="cn">TRUE</span>,</span> <span> template <span class="op">=</span> <span class="cn">NULL</span>,</span> -<span> chyaml <span class="op">=</span> <span class="cn">TRUE</span></span> +<span> chyaml <span class="op">=</span> <span class="cn">FALSE</span></span> <span><span class="op">)</span></span></code></pre></div><p></p></div> -</div> - -<div class="section"> +</div><p></p><div class="section"> <h4 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h4> <p></p><div class="arguments"><dl><dt><code>identifier</code></dt> <dd><p>Identifier to be stored in the object</p></dd> - -<dt><code>smiles</code></dt> + <dt><code>smiles</code></dt> <dd><p>Optional user provided SMILES code</p></dd> - -<dt><code>inchikey</code></dt> + <dt><code>inchikey</code></dt> <dd><p>Optional user provided InChI Key</p></dd> - -<dt><code>pubchem</code></dt> + <dt><code>pubchem</code></dt> <dd><p>Should an attempt be made to retrieve chemical information from PubChem via the webchem package?</p></dd> - -<dt><code>pubchem_from</code></dt> + <dt><code>pubchem_from</code></dt> <dd><p>Possibility to select the argument that is used to query pubchem</p></dd> - -<dt><code>rdkit</code></dt> + <dt><code>rdkit</code></dt> <dd><p>Should an attempt be made to retrieve chemical information from a local rdkit installation via python and the reticulate package?</p></dd> - -<dt><code>template</code></dt> + <dt><code>template</code></dt> <dd><p>An optional SMILES code to be used as template for RDKit</p></dd> - -<dt><code>chyaml</code></dt> + <dt><code>chyaml</code></dt> <dd><p>Should we look for a identifier.yaml file in the working -directory? -Try to get chemical information from PubChem</p></dd> +directory?</p></dd> </dl><p></p></div> </div> -</div><p></p><hr><a id="method-chent-try_pubchem"></a><div class="section"> -<h3 id="method-try-pubchem-">Method <code>try_pubchem()</code><a class="anchor" aria-label="anchor" href="#method-try-pubchem-"></a></h3> - -<div class="section"> -<h4 id="usage-1">Usage<a class="anchor" aria-label="anchor" href="#usage-1"></a></h4> -<p></p><div class="r"><div class="sourceCode"><pre><code><span><span class="va">chent</span><span class="op">$</span><span class="fu">try_pubchem</span><span class="op">(</span><span class="va">query</span>, from <span class="op">=</span> <span class="st">"name"</span><span class="op">)</span></span></code></pre></div><p></p></div> </div> -<div class="section"> +<p></p><hr><a id="method-chent-try_pubchem"></a><div class="section"> +<h3 id="chent-try-pubchem-"><code>chent$try_pubchem()</code><a class="anchor" aria-label="anchor" href="#chent-try-pubchem-"></a></h3> +<p>Try to get chemical information from PubChem</p><div class="section"> +<h4 id="usage-1">Usage<a class="anchor" aria-label="anchor" href="#usage-1"></a></h4> +<p></p><div class="r"><div class="sourceCode"><pre><code><span><span class="va">chent</span><span class="op">$</span><span class="fu">try_pubchem</span><span class="op">(</span>query <span class="op">=</span> <span class="va">self</span><span class="op">$</span><span class="va">identifier</span>, from <span class="op">=</span> <span class="st">"name"</span><span class="op">)</span></span></code></pre></div><p></p></div> +</div><p></p><div class="section"> <h4 id="arguments-1">Arguments<a class="anchor" aria-label="anchor" href="#arguments-1"></a></h4> <p></p><div class="arguments"><dl><dt><code>query</code></dt> <dd><p>Query string to be passed to <a href="https://docs.ropensci.org/webchem/reference/get_cid.html" class="external-link">get_cid</a></p></dd> - -<dt><code>from</code></dt> -<dd><p>Passed to <a href="https://docs.ropensci.org/webchem/reference/get_cid.html" class="external-link">get_cid</a> -Get chemical information from PubChem for a known PubChem CID</p></dd> + <dt><code>from</code></dt> +<dd><p>Passed to <a href="https://docs.ropensci.org/webchem/reference/get_cid.html" class="external-link">get_cid</a></p></dd> </dl><p></p></div> </div> -</div><p></p><hr><a id="method-chent-get_pubchem"></a><div class="section"> -<h3 id="method-get-pubchem-">Method <code>get_pubchem()</code><a class="anchor" aria-label="anchor" href="#method-get-pubchem-"></a></h3> +</div> -<div class="section"> +<p></p><hr><a id="method-chent-get_pubchem"></a><div class="section"> +<h3 id="chent-get-pubchem-"><code>chent$get_pubchem()</code><a class="anchor" aria-label="anchor" href="#chent-get-pubchem-"></a></h3> +<p>Get chemical information from PubChem for a known PubChem CID</p><div class="section"> <h4 id="usage-2">Usage<a class="anchor" aria-label="anchor" href="#usage-2"></a></h4> <p></p><div class="r"><div class="sourceCode"><pre><code><span><span class="va">chent</span><span class="op">$</span><span class="fu">get_pubchem</span><span class="op">(</span><span class="va">pubchem_cid</span><span class="op">)</span></span></code></pre></div><p></p></div> -</div> - -<div class="section"> +</div><p></p><div class="section"> <h4 id="arguments-2">Arguments<a class="anchor" aria-label="anchor" href="#arguments-2"></a></h4> <p></p><div class="arguments"><dl><dt><code>pubchem_cid</code></dt> -<dd><p>CID -Get chemical information from RDKit if available</p></dd> +<dd><p>CID</p></dd> </dl><p></p></div> </div> -</div><p></p><hr><a id="method-chent-get_rdkit"></a><div class="section"> -<h3 id="method-get-rdkit-">Method <code>get_rdkit()</code><a class="anchor" aria-label="anchor" href="#method-get-rdkit-"></a></h3> +</div> -<div class="section"> +<p></p><hr><a id="method-chent-get_rdkit"></a><div class="section"> +<h3 id="chent-get-rdkit-"><code>chent$get_rdkit()</code><a class="anchor" aria-label="anchor" href="#chent-get-rdkit-"></a></h3> +<p>Get chemical information from RDKit if available</p><div class="section"> <h4 id="usage-3">Usage<a class="anchor" aria-label="anchor" href="#usage-3"></a></h4> <p></p><div class="r"><div class="sourceCode"><pre><code><span><span class="va">chent</span><span class="op">$</span><span class="fu">get_rdkit</span><span class="op">(</span>template <span class="op">=</span> <span class="cn">NULL</span><span class="op">)</span></span></code></pre></div><p></p></div> -</div> - -<div class="section"> +</div><p></p><div class="section"> <h4 id="arguments-3">Arguments<a class="anchor" aria-label="anchor" href="#arguments-3"></a></h4> <p></p><div class="arguments"><dl><dt><code>template</code></dt> -<dd><p>Optional template specified as a SMILES code -Obtain information from a YAML file</p></dd> +<dd><p>An optional SMILES code to be used as template for RDKit</p></dd> </dl><p></p></div> </div> -</div><p></p><hr><a id="method-chent-get_chyaml"></a><div class="section"> -<h3 id="method-get-chyaml-">Method <code>get_chyaml()</code><a class="anchor" aria-label="anchor" href="#method-get-chyaml-"></a></h3> +</div> -<div class="section"> +<p></p><hr><a id="method-chent-get_chyaml"></a><div class="section"> +<h3 id="chent-get-chyaml-"><code>chent$get_chyaml()</code><a class="anchor" aria-label="anchor" href="#chent-get-chyaml-"></a></h3> +<p>Obtain information from a YAML file</p><div class="section"> <h4 id="usage-4">Usage<a class="anchor" aria-label="anchor" href="#usage-4"></a></h4> <p></p><div class="r"><div class="sourceCode"><pre><code><span><span class="va">chent</span><span class="op">$</span><span class="fu">get_chyaml</span><span class="op">(</span></span> <span> repo <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"wd"</span>, <span class="st">"local"</span>, <span class="st">"web"</span><span class="op">)</span>,</span> <span> chyaml <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/paste.html" class="external-link">paste0</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/utils/URLencode.html" class="external-link">URLencode</a></span><span class="op">(</span><span class="va">self</span><span class="op">$</span><span class="va">identifier</span><span class="op">)</span>, <span class="st">".yaml"</span><span class="op">)</span></span> <span><span class="op">)</span></span></code></pre></div><p></p></div> -</div> - -<div class="section"> +</div><p></p><div class="section"> <h4 id="arguments-4">Arguments<a class="anchor" aria-label="anchor" href="#arguments-4"></a></h4> <p></p><div class="arguments"><dl><dt><code>repo</code></dt> <dd><p>Should the file be looked for in the current working directory, a local git repository under <code>~/git/chyaml</code>, or from the web (not implemented).</p></dd> - -<dt><code>chyaml</code></dt> -<dd><p>The filename to be looked for -Add a vapour pressure</p></dd> + <dt><code>chyaml</code></dt> +<dd><p>The filename to be looked for</p></dd> </dl><p></p></div> </div> -</div><p></p><hr><a id="method-chent-add_p0"></a><div class="section"> -<h3 id="method-add-p-">Method <code>add_p0()</code><a class="anchor" aria-label="anchor" href="#method-add-p-"></a></h3> +</div> -<div class="section"> +<p></p><hr><a id="method-chent-add_p0"></a><div class="section"> +<h3 id="chent-add-p-"><code>chent$add_p0()</code><a class="anchor" aria-label="anchor" href="#chent-add-p-"></a></h3> +<p>Add a vapour pressure</p><div class="section"> <h4 id="usage-5">Usage<a class="anchor" aria-label="anchor" href="#usage-5"></a></h4> <p></p><div class="r"><div class="sourceCode"><pre><code><span><span class="va">chent</span><span class="op">$</span><span class="fu">add_p0</span><span class="op">(</span><span class="va">p0</span>, T <span class="op">=</span> <span class="cn">NA</span>, source <span class="op">=</span> <span class="cn">NA</span>, page <span class="op">=</span> <span class="cn">NA</span>, remark <span class="op">=</span> <span class="st">""</span><span class="op">)</span></span></code></pre></div><p></p></div> -</div> - -<div class="section"> +</div><p></p><div class="section"> <h4 id="arguments-5">Arguments<a class="anchor" aria-label="anchor" href="#arguments-5"></a></h4> <p></p><div class="arguments"><dl><dt><code>p0</code></dt> <dd><p>The vapour pressure in Pa</p></dd> - -<dt><code>T</code></dt> + <dt><code>T</code></dt> <dd><p>Temperature</p></dd> - -<dt><code>source</code></dt> + <dt><code>source</code></dt> <dd><p>An acronym specifying the source of the information</p></dd> - -<dt><code>page</code></dt> + <dt><code>page</code></dt> <dd><p>The page from which the information was taken</p></dd> - -<dt><code>remark</code></dt> -<dd><p>A remark -Add a water solubility</p></dd> + <dt><code>remark</code></dt> +<dd><p>A remark</p></dd> </dl><p></p></div> </div> -</div><p></p><hr><a id="method-chent-add_cwsat"></a><div class="section"> -<h3 id="method-add-cwsat-">Method <code>add_cwsat()</code><a class="anchor" aria-label="anchor" href="#method-add-cwsat-"></a></h3> +</div> -<div class="section"> +<p></p><hr><a id="method-chent-add_cwsat"></a><div class="section"> +<h3 id="chent-add-cwsat-"><code>chent$add_cwsat()</code><a class="anchor" aria-label="anchor" href="#chent-add-cwsat-"></a></h3> +<p>Add a water solubility</p><div class="section"> <h4 id="usage-6">Usage<a class="anchor" aria-label="anchor" href="#usage-6"></a></h4> <p></p><div class="r"><div class="sourceCode"><pre><code><span><span class="va">chent</span><span class="op">$</span><span class="fu">add_cwsat</span><span class="op">(</span><span class="va">cwsat</span>, T <span class="op">=</span> <span class="cn">NA</span>, pH <span class="op">=</span> <span class="cn">NA</span>, source <span class="op">=</span> <span class="cn">NA</span>, page <span class="op">=</span> <span class="cn">NA</span>, remark <span class="op">=</span> <span class="st">""</span><span class="op">)</span></span></code></pre></div><p></p></div> -</div> - -<div class="section"> +</div><p></p><div class="section"> <h4 id="arguments-6">Arguments<a class="anchor" aria-label="anchor" href="#arguments-6"></a></h4> <p></p><div class="arguments"><dl><dt><code>cwsat</code></dt> <dd><p>The water solubility in mg/L</p></dd> - -<dt><code>T</code></dt> + <dt><code>T</code></dt> <dd><p>Temperature</p></dd> + <dt><code>pH</code></dt> +<dd><p>pH value</p></dd> -<dt><code>pH</code></dt> -<dd><p>The pH value</p></dd> - - -<dt><code>source</code></dt> + <dt><code>source</code></dt> <dd><p>An acronym specifying the source of the information</p></dd> - -<dt><code>page</code></dt> + <dt><code>page</code></dt> <dd><p>The page from which the information was taken</p></dd> - -<dt><code>remark</code></dt> -<dd><p>A remark -Add a plant uptake factor</p></dd> + <dt><code>remark</code></dt> +<dd><p>A remark</p></dd> </dl><p></p></div> </div> -</div><p></p><hr><a id="method-chent-add_PUF"></a><div class="section"> -<h3 id="method-add-puf-">Method <code>add_PUF()</code><a class="anchor" aria-label="anchor" href="#method-add-puf-"></a></h3> +</div> -<div class="section"> +<p></p><hr><a id="method-chent-add_PUF"></a><div class="section"> +<h3 id="chent-add-puf-"><code>chent$add_PUF()</code><a class="anchor" aria-label="anchor" href="#chent-add-puf-"></a></h3> +<p>Add a plant uptake factor</p><div class="section"> <h4 id="usage-7">Usage<a class="anchor" aria-label="anchor" href="#usage-7"></a></h4> <p></p><div class="r"><div class="sourceCode"><pre><code><span><span class="va">chent</span><span class="op">$</span><span class="fu">add_PUF</span><span class="op">(</span></span> <span> PUF <span class="op">=</span> <span class="fl">0</span>,</span> @@ -391,58 +354,51 @@ Add a plant uptake factor</p></dd> <span> page <span class="op">=</span> <span class="fl">41</span>,</span> <span> remark <span class="op">=</span> <span class="st">"Conservative default value"</span></span> <span><span class="op">)</span></span></code></pre></div><p></p></div> -</div> - -<div class="section"> +</div><p></p><div class="section"> <h4 id="arguments-7">Arguments<a class="anchor" aria-label="anchor" href="#arguments-7"></a></h4> <p></p><div class="arguments"><dl><dt><code>PUF</code></dt> <dd><p>The plant uptake factor, a number between 0 and 1</p></dd> - -<dt><code>source</code></dt> + <dt><code>source</code></dt> <dd><p>An acronym specifying the source of the information</p></dd> - -<dt><code>page</code></dt> + <dt><code>page</code></dt> <dd><p>The page from which the information was taken</p></dd> - -<dt><code>remark</code></dt> + <dt><code>remark</code></dt> <dd><p>A remark</p></dd> </dl><p></p></div> </div> -</div><p></p><hr><a id="method-chent-add_TP"></a><div class="section"> -<h3 id="method-add-tp-">Method <code>add_TP()</code><a class="anchor" aria-label="anchor" href="#method-add-tp-"></a></h3> +</div> -<div class="section"> +<p></p><hr><a id="method-chent-add_TP"></a><div class="section"> +<h3 id="chent-add-tp-"><code>chent$add_TP()</code><a class="anchor" aria-label="anchor" href="#chent-add-tp-"></a></h3> +<p>Add a transformation product to the internal list</p><div class="section"> <h4 id="usage-8">Usage<a class="anchor" aria-label="anchor" href="#usage-8"></a></h4> <p></p><div class="r"><div class="sourceCode"><pre><code><span><span class="va">chent</span><span class="op">$</span><span class="fu">add_TP</span><span class="op">(</span><span class="va">x</span>, smiles <span class="op">=</span> <span class="cn">NULL</span>, pubchem <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span></span></code></pre></div><p></p></div> -</div> - -<div class="section"> +</div><p></p><div class="section"> <h4 id="arguments-8">Arguments<a class="anchor" aria-label="anchor" href="#arguments-8"></a></h4> <p></p><div class="arguments"><dl><dt><code>x</code></dt> <dd><p>A chent object, or an identifier to generate a chent object</p></dd> + <dt><code>smiles</code></dt> +<dd><p>Optional user provided SMILES code</p></dd> -<dt><code>smiles</code></dt> -<dd><p>A SMILES code for defining a chent object</p></dd> - - -<dt><code>pubchem</code></dt> + <dt><code>pubchem</code></dt> <dd><p>Should chemical information be obtained from PubChem?</p></dd> </dl><p></p></div> </div> -</div><p></p><hr><a id="method-chent-add_transformation"></a><div class="section"> -<h3 id="method-add-transformation-">Method <code>add_transformation()</code><a class="anchor" aria-label="anchor" href="#method-add-transformation-"></a></h3> +</div> -<div class="section"> +<p></p><hr><a id="method-chent-add_transformation"></a><div class="section"> +<h3 id="chent-add-transformation-"><code>chent$add_transformation()</code><a class="anchor" aria-label="anchor" href="#chent-add-transformation-"></a></h3> +<p>Add a line in the internal dataframe holding observed transformations</p><div class="section"> <h4 id="usage-9">Usage<a class="anchor" aria-label="anchor" href="#usage-9"></a></h4> <p></p><div class="r"><div class="sourceCode"><pre><code><span><span class="va">chent</span><span class="op">$</span><span class="fu">add_transformation</span><span class="op">(</span></span> <span> <span class="va">study_type</span>,</span> @@ -452,44 +408,38 @@ Add a plant uptake factor</p></dd> <span> source <span class="op">=</span> <span class="cn">NA</span>,</span> <span> pages <span class="op">=</span> <span class="cn">NA</span></span> <span><span class="op">)</span></span></code></pre></div><p></p></div> -</div> - -<div class="section"> +</div><p></p><div class="section"> <h4 id="arguments-9">Arguments<a class="anchor" aria-label="anchor" href="#arguments-9"></a></h4> <p></p><div class="arguments"><dl><dt><code>study_type</code></dt> <dd><p>A characterisation of the study type</p></dd> - -<dt><code>TP_identifier</code></dt> + <dt><code>TP_identifier</code></dt> <dd><p>An identifier of one of the transformation products in <code>self$TPs</code></p></dd> - -<dt><code>max_occurrence</code></dt> + <dt><code>max_occurrence</code></dt> <dd><p>The maximum observed occurrence of the transformation product, expressed as a fraction of the amount that would result from stochiometric transformation</p></dd> - -<dt><code>remark</code></dt> + <dt><code>remark</code></dt> <dd><p>A remark</p></dd> - -<dt><code>source</code></dt> + <dt><code>source</code></dt> <dd><p>An acronym specifying the source of the information</p></dd> - -<dt><code>pages</code></dt> -<dd><p>The page from which the information was taken</p></dd> + <dt><code>pages</code></dt> +<dd><p>The pages from which the information was taken</p></dd> </dl><p></p></div> </div> -</div><p></p><hr><a id="method-chent-add_soil_degradation"></a><div class="section"> -<h3 id="method-add-soil-degradation-">Method <code>add_soil_degradation()</code><a class="anchor" aria-label="anchor" href="#method-add-soil-degradation-"></a></h3> +</div> -<div class="section"> +<p></p><hr><a id="method-chent-add_soil_degradation"></a><div class="section"> +<h3 id="chent-add-soil-degradation-"><code>chent$add_soil_degradation()</code><a class="anchor" aria-label="anchor" href="#chent-add-soil-degradation-"></a></h3> +<p>Add a line in the internal dataframe holding modelling DT50 values</p><div class="section"> <h4 id="usage-10">Usage<a class="anchor" aria-label="anchor" href="#usage-10"></a></h4> <p></p><div class="r"><div class="sourceCode"><pre><code><span><span class="va">chent</span><span class="op">$</span><span class="fu">add_soil_degradation</span><span class="op">(</span></span> <span> <span class="va">soils</span>,</span> @@ -511,117 +461,105 @@ result from stochiometric transformation</p></dd> <span> <span class="va">source</span>,</span> <span> page <span class="op">=</span> <span class="cn">NA</span></span> <span><span class="op">)</span></span></code></pre></div><p></p></div> -</div> - -<div class="section"> +</div><p></p><div class="section"> <h4 id="arguments-10">Arguments<a class="anchor" aria-label="anchor" href="#arguments-10"></a></h4> <p></p><div class="arguments"><dl><dt><code>soils</code></dt> <dd><p>Names of the soils</p></dd> - -<dt><code>DT50_mod</code></dt> + <dt><code>DT50_mod</code></dt> <dd><p>The modelling DT50 in the sense of regulatory pesticide fate modelling</p></dd> - -<dt><code>DT50_mod_ref</code></dt> + <dt><code>DT50_mod_ref</code></dt> <dd><p>The normalised modelling DT50 in the sense of regulatory pesticide fate modelling</p></dd> - -<dt><code>type</code></dt> + <dt><code>type</code></dt> <dd><p>The soil type</p></dd> - -<dt><code>country</code></dt> + <dt><code>country</code></dt> <dd><p>The country (mainly for field studies)</p></dd> - -<dt><code>pH_orig</code></dt> + <dt><code>pH_orig</code></dt> <dd><p>The pH stated in the study</p></dd> - -<dt><code>pH_medium</code></dt> + <dt><code>pH_medium</code></dt> <dd><p>The medium in which this pH was measured</p></dd> - -<dt><code>pH_H2O</code></dt> + <dt><code>pH_H2O</code></dt> <dd><p>The pH extrapolated to pure water</p></dd> - -<dt><code>perc_OC</code></dt> + <dt><code>perc_OC</code></dt> <dd><p>The percentage of organic carbon in the soil</p></dd> - -<dt><code>temperature</code></dt> + <dt><code>temperature</code></dt> <dd><p>The temperature during the study in degrees Celsius</p></dd> - -<dt><code>moisture</code></dt> + <dt><code>moisture</code></dt> <dd><p>The moisture during the study</p></dd> - -<dt><code>category</code></dt> + <dt><code>category</code></dt> <dd><p>Is it a laboratory ('lab') or field study ('field')</p></dd> - -<dt><code>formulation</code></dt> + <dt><code>formulation</code></dt> <dd><p>Name of the formulation applied, if it was not the technical active ingredient</p></dd> - -<dt><code>model</code></dt> + <dt><code>model</code></dt> <dd><p>The degradation model used for deriving <code>DT50_mod</code></p></dd> - -<dt><code>chi2</code></dt> + <dt><code>chi2</code></dt> <dd><p>The relative error as defined in FOCUS kinetics</p></dd> - -<dt><code>remark</code></dt> + <dt><code>remark</code></dt> <dd><p>A remark</p></dd> - -<dt><code>source</code></dt> + <dt><code>source</code></dt> <dd><p>An acronym specifying the source of the information</p></dd> - -<dt><code>page</code></dt> + <dt><code>page</code></dt> <dd><p>The page from which the information was taken</p></dd> </dl><p></p></div> </div> -</div><p></p><hr><a id="method-chent-add_soil_ff"></a><div class="section"> -<h3 id="method-add-soil-ff-">Method <code>add_soil_ff()</code><a class="anchor" aria-label="anchor" href="#method-add-soil-ff-"></a></h3> +</div> -<div class="section"> +<p></p><hr><a id="method-chent-add_soil_ff"></a><div class="section"> +<h3 id="chent-add-soil-ff-"><code>chent$add_soil_ff()</code><a class="anchor" aria-label="anchor" href="#chent-add-soil-ff-"></a></h3> +<p>Add one or more formation fractions for degradation in soil</p><div class="section"> <h4 id="usage-11">Usage<a class="anchor" aria-label="anchor" href="#usage-11"></a></h4> <p></p><div class="r"><div class="sourceCode"><pre><code><span><span class="va">chent</span><span class="op">$</span><span class="fu">add_soil_ff</span><span class="op">(</span><span class="va">target</span>, <span class="va">soils</span>, ff <span class="op">=</span> <span class="fl">1</span>, remark <span class="op">=</span> <span class="st">""</span>, <span class="va">source</span>, page <span class="op">=</span> <span class="cn">NA</span><span class="op">)</span></span></code></pre></div><p></p></div> -</div> - -<div class="section"> +</div><p></p><div class="section"> <h4 id="arguments-11">Arguments<a class="anchor" aria-label="anchor" href="#arguments-11"></a></h4> <p></p><div class="arguments"><dl><dt><code>target</code></dt> <dd><p>The identifier(s) of the transformation product</p></dd> - -<dt><code>soils</code></dt> + <dt><code>soils</code></dt> <dd><p>The soil name(s) in which the transformation was observed</p></dd> - -<dt><code>ff</code></dt> + <dt><code>ff</code></dt> <dd><p>The formation fraction(s)</p></dd> + <dt><code>remark</code></dt> +<dd><p>A remark</p></dd> + + <dt><code>source</code></dt> +<dd><p>An acronym specifying the source of the information</p></dd> + + <dt><code>page</code></dt> +<dd><p>The page from which the information was taken</p></dd> + </dl><p></p></div> </div> -</div><p></p><hr><a id="method-chent-add_soil_sorption"></a><div class="section"> -<h3 id="method-add-soil-sorption-">Method <code>add_soil_sorption()</code><a class="anchor" aria-label="anchor" href="#method-add-soil-sorption-"></a></h3> +</div> -<div class="section"> +<p></p><hr><a id="method-chent-add_soil_sorption"></a><div class="section"> +<h3 id="chent-add-soil-sorption-"><code>chent$add_soil_sorption()</code><a class="anchor" aria-label="anchor" href="#chent-add-soil-sorption-"></a></h3> +<p>Add soil sorption data</p><div class="section"> <h4 id="usage-12">Usage<a class="anchor" aria-label="anchor" href="#usage-12"></a></h4> <p></p><div class="r"><div class="sourceCode"><pre><code><span><span class="va">chent</span><span class="op">$</span><span class="fu">add_soil_sorption</span><span class="op">(</span></span> <span> <span class="va">soils</span>,</span> @@ -639,112 +577,134 @@ the technical active ingredient</p></dd> <span> <span class="va">source</span>,</span> <span> page <span class="op">=</span> <span class="cn">NA</span></span> <span><span class="op">)</span></span></code></pre></div><p></p></div> -</div> - -<div class="section"> +</div><p></p><div class="section"> <h4 id="arguments-12">Arguments<a class="anchor" aria-label="anchor" href="#arguments-12"></a></h4> -<p></p><div class="arguments"><dl><dt><code>Kf</code></dt> +<p></p><div class="arguments"><dl><dt><code>soils</code></dt> +<dd><p>Names of the soils</p></dd> + + <dt><code>Kf</code></dt> <dd><p>The sorption constant in L/kg, either linear (then <code>N</code> is 1) or according to Freundlich</p></dd> - -<dt><code>Kfoc</code></dt> + <dt><code>Kfoc</code></dt> <dd><p>The constant from above, normalised to soil organic carbon</p></dd> - -<dt><code>N</code></dt> + <dt><code>N</code></dt> <dd><p>The Freundlich exponent</p></dd> + <dt><code>type</code></dt> +<dd><p>The soil type</p></dd> + + <dt><code>pH_orig</code></dt> +<dd><p>The pH stated in the study</p></dd> + + <dt><code>pH_medium</code></dt> +<dd><p>The medium in which this pH was measured</p></dd> + + <dt><code>pH_H2O</code></dt> +<dd><p>The pH extrapolated to pure water</p></dd> + + <dt><code>perc_OC</code></dt> +<dd><p>The percentage of organic carbon in the soil</p></dd> -<dt><code>perc_clay</code></dt> + <dt><code>perc_clay</code></dt> <dd><p>The percentage of clay in the soil</p></dd> + <dt><code>CEC</code></dt> +<dd><p>The cation exchange capacity</p></dd> + + <dt><code>remark</code></dt> +<dd><p>A remark</p></dd> + + <dt><code>source</code></dt> +<dd><p>An acronym specifying the source of the information</p></dd> -<dt><code>CEC</code></dt> -<dd><p>The cation exchange capacity -Write a PDF image of the structure</p></dd> + <dt><code>page</code></dt> +<dd><p>The page from which the information was taken</p></dd> </dl><p></p></div> </div> -</div><p></p><hr><a id="method-chent-pdf"></a><div class="section"> -<h3 id="method-pdf-">Method <code><a href="https://rdrr.io/r/grDevices/pdf.html" class="external-link">pdf()</a></code><a class="anchor" aria-label="anchor" href="#method-pdf-"></a></h3> +</div> -<div class="section"> +<p></p><hr><a id="method-chent-pdf"></a><div class="section"> +<h3 id="chent-pdf-"><code>chent$pdf()</code><a class="anchor" aria-label="anchor" href="#chent-pdf-"></a></h3> +<p>Write a PDF image of the structure</p><div class="section"> <h4 id="usage-13">Usage<a class="anchor" aria-label="anchor" href="#usage-13"></a></h4> <p></p><div class="r"><div class="sourceCode"><pre><code><span><span class="va">chent</span><span class="op">$</span><span class="fu">pdf</span><span class="op">(</span></span> <span> file <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/paste.html" class="external-link">paste0</a></span><span class="op">(</span><span class="va">self</span><span class="op">$</span><span class="va">identifier</span>, <span class="st">".pdf"</span><span class="op">)</span>,</span> <span> dir <span class="op">=</span> <span class="st">"structures/pdf"</span>,</span> <span> template <span class="op">=</span> <span class="cn">NULL</span></span> <span><span class="op">)</span></span></code></pre></div><p></p></div> -</div> - -<div class="section"> +</div><p></p><div class="section"> <h4 id="arguments-13">Arguments<a class="anchor" aria-label="anchor" href="#arguments-13"></a></h4> <p></p><div class="arguments"><dl><dt><code>file</code></dt> <dd><p>The file to write to</p></dd> - -<dt><code>dir</code></dt> + <dt><code>dir</code></dt> <dd><p>The directory to write the file to</p></dd> - -<dt><code>template</code></dt> -<dd><p>A template expressed as SMILES to use in RDKit -Write a PNG image of the structure</p></dd> + <dt><code>template</code></dt> +<dd><p>An optional SMILES code to be used as template for RDKit</p></dd> </dl><p></p></div> </div> -</div><p></p><hr><a id="method-chent-png"></a><div class="section"> -<h3 id="method-png-">Method <code><a href="https://rdrr.io/r/grDevices/png.html" class="external-link">png()</a></code><a class="anchor" aria-label="anchor" href="#method-png-"></a></h3> +</div> -<div class="section"> +<p></p><hr><a id="method-chent-png"></a><div class="section"> +<h3 id="chent-png-"><code>chent$png()</code><a class="anchor" aria-label="anchor" href="#chent-png-"></a></h3> +<p>Write a PNG image of the structure</p><div class="section"> <h4 id="usage-14">Usage<a class="anchor" aria-label="anchor" href="#usage-14"></a></h4> <p></p><div class="r"><div class="sourceCode"><pre><code><span><span class="va">chent</span><span class="op">$</span><span class="fu">png</span><span class="op">(</span></span> <span> file <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/paste.html" class="external-link">paste0</a></span><span class="op">(</span><span class="va">self</span><span class="op">$</span><span class="va">identifier</span>, <span class="st">".png"</span><span class="op">)</span>,</span> <span> dir <span class="op">=</span> <span class="st">"structures/png"</span>,</span> <span> antialias <span class="op">=</span> <span class="st">"gray"</span></span> <span><span class="op">)</span></span></code></pre></div><p></p></div> -</div> - -<div class="section"> +</div><p></p><div class="section"> <h4 id="arguments-14">Arguments<a class="anchor" aria-label="anchor" href="#arguments-14"></a></h4> -<p></p><div class="arguments"><dl><dt><code>antialias</code></dt> -<dd><p>Passed to <a href="https://rdrr.io/r/grDevices/png.html" class="external-link">png</a> -Write an EMF image of the structure using <a href="https://rdrr.io/pkg/devEMF/man/emf.html" class="external-link">emf</a></p></dd> +<p></p><div class="arguments"><dl><dt><code>file</code></dt> +<dd><p>The file to write to</p></dd> + + <dt><code>dir</code></dt> +<dd><p>The directory to write the file to</p></dd> + + <dt><code>antialias</code></dt> +<dd><p>Passed to <a href="https://rdrr.io/r/grDevices/png.html" class="external-link">png</a></p></dd> </dl><p></p></div> </div> -</div><p></p><hr><a id="method-chent-emf"></a><div class="section"> -<h3 id="method-emf-">Method <code>emf()</code><a class="anchor" aria-label="anchor" href="#method-emf-"></a></h3> +</div> -<div class="section"> +<p></p><hr><a id="method-chent-emf"></a><div class="section"> +<h3 id="chent-emf-"><code>chent$emf()</code><a class="anchor" aria-label="anchor" href="#chent-emf-"></a></h3> +<p>Write an EMF image of the structure using <a href="https://rdrr.io/pkg/devEMF/man/emf.html" class="external-link">emf</a></p><div class="section"> <h4 id="usage-15">Usage<a class="anchor" aria-label="anchor" href="#usage-15"></a></h4> <p></p><div class="r"><div class="sourceCode"><pre><code><span><span class="va">chent</span><span class="op">$</span><span class="fu">emf</span><span class="op">(</span>file <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/paste.html" class="external-link">paste0</a></span><span class="op">(</span><span class="va">self</span><span class="op">$</span><span class="va">identifier</span>, <span class="st">".emf"</span><span class="op">)</span>, dir <span class="op">=</span> <span class="st">"structures/emf"</span><span class="op">)</span></span></code></pre></div><p></p></div> -</div> - -<div class="section"> +</div><p></p><div class="section"> <h4 id="arguments-15">Arguments<a class="anchor" aria-label="anchor" href="#arguments-15"></a></h4> <p></p><div class="arguments"><dl><dt><code>file</code></dt> <dd><p>The file to write to</p></dd> + <dt><code>dir</code></dt> +<dd><p>The directory to write the file to</p></dd> + </dl><p></p></div> </div> -</div><p></p><hr><a id="method-chent-clone"></a><div class="section"> -<h3 id="method-clone-">Method <code>clone()</code><a class="anchor" aria-label="anchor" href="#method-clone-"></a></h3> +</div> + +<p></p><hr><a id="method-chent-clone"></a><div class="section"> +<h3 id="chent-clone-"><code>chent$clone()</code><a class="anchor" aria-label="anchor" href="#chent-clone-"></a></h3> <p>The objects of this class are cloneable with this method.</p><div class="section"> <h4 id="usage-16">Usage<a class="anchor" aria-label="anchor" href="#usage-16"></a></h4> <p></p><div class="r"><div class="sourceCode"><pre><code><span><span class="va">chent</span><span class="op">$</span><span class="fu">clone</span><span class="op">(</span>deep <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span></span></code></pre></div><p></p></div> -</div> - -<div class="section"> +</div><p></p><div class="section"> <h4 id="arguments-16">Arguments<a class="anchor" aria-label="anchor" href="#arguments-16"></a></h4> <p></p><div class="arguments"><dl><dt><code>deep</code></dt> <dd><p>Whether to make a deep clone.</p></dd> @@ -755,37 +715,23 @@ Write an EMF image of the structure using <a href="https://rdrr.io/pkg/devEMF/ma </div> + </div> <div class="section level2"> <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> - <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="va">oct</span> <span class="op"><-</span> <span class="va">chent</span><span class="op">$</span><span class="fu">new</span><span class="op">(</span><span class="st">"1-octanol"</span>, smiles <span class="op">=</span> <span class="st">"CCCCCCCCO"</span>, pubchem <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span></span></span> -<span class="r-msg co"><span class="r-pr">#></span> Trying to get chemical information from RDKit using user SMILES</span> -<span class="r-msg co"><span class="r-pr">#></span> CCCCCCCCO</span> -<span class="r-msg co"><span class="r-pr">#></span> Did not find chyaml file ./1-octanol.yaml</span> -<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/print.html" class="external-link">print</a></span><span class="op">(</span><span class="va">oct</span><span class="op">)</span></span></span> -<span class="r-out co"><span class="r-pr">#></span> <chent></span> -<span class="r-out co"><span class="r-pr">#></span> Identifier $identifier 1-octanol </span> -<span class="r-out co"><span class="r-pr">#></span> InChI Key $inchikey NA </span> -<span class="r-out co"><span class="r-pr">#></span> SMILES string $smiles:</span> -<span class="r-out co"><span class="r-pr">#></span> user </span> -<span class="r-out co"><span class="r-pr">#></span> "CCCCCCCCO" </span> -<span class="r-out co"><span class="r-pr">#></span> Molecular weight $mw: 130.2 </span> -<span class="r-in"><span><span class="kw">if</span> <span class="op">(</span><span class="op">!</span><span class="fu"><a href="https://rdrr.io/r/base/NULL.html" class="external-link">is.null</a></span><span class="op">(</span><span class="va">oct</span><span class="op">$</span><span class="va">Picture</span><span class="op">)</span><span class="op">)</span> <span class="op">{</span></span></span> -<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot</a></span><span class="op">(</span><span class="va">oct</span><span class="op">)</span></span></span> -<span class="r-in"><span><span class="op">}</span></span></span> -<span class="r-in"><span></span></span> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="co"># Don't run examples per default, as PubChem may be unavailable</span></span></span> +<span class="r-in"><span><span class="co"># \dontrun{</span></span></span> <span class="r-in"><span><span class="va">caffeine</span> <span class="op"><-</span> <span class="va">chent</span><span class="op">$</span><span class="fu">new</span><span class="op">(</span><span class="st">"caffeine"</span><span class="op">)</span></span></span> -<span class="r-msg co"><span class="r-pr">#></span> PubChem:</span> -<span class="r-msg co"><span class="r-pr">#></span> Trying to get chemical information from RDKit using PubChem_Canonical SMILES</span> +<span class="r-msg co"><span class="r-pr">#></span> Querying PubChem for name caffeine ...</span> +<span class="r-msg co"><span class="r-pr">#></span> Get chemical information from RDKit using PubChem SMILES</span> <span class="r-msg co"><span class="r-pr">#></span> CN1C=NC2=C1C(=O)N(C(=O)N2C)C</span> -<span class="r-msg co"><span class="r-pr">#></span> Did not find chyaml file ./caffeine.yaml</span> <span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/print.html" class="external-link">print</a></span><span class="op">(</span><span class="va">caffeine</span><span class="op">)</span></span></span> <span class="r-out co"><span class="r-pr">#></span> <chent></span> <span class="r-out co"><span class="r-pr">#></span> Identifier $identifier caffeine </span> <span class="r-out co"><span class="r-pr">#></span> InChI Key $inchikey RYYVLZVUVIJVGH-UHFFFAOYSA-N </span> <span class="r-out co"><span class="r-pr">#></span> SMILES string $smiles:</span> -<span class="r-out co"><span class="r-pr">#></span> PubChem_Canonical </span> +<span class="r-out co"><span class="r-pr">#></span> PubChem </span> <span class="r-out co"><span class="r-pr">#></span> "CN1C=NC2=C1C(=O)N(C(=O)N2C)C" </span> <span class="r-out co"><span class="r-pr">#></span> Molecular weight $mw: 194.2 </span> <span class="r-out co"><span class="r-pr">#></span> PubChem synonyms (up to 10):</span> @@ -793,11 +739,23 @@ Write an EMF image of the structure using <a href="https://rdrr.io/pkg/devEMF/ma <span class="r-out co"><span class="r-pr">#></span> [3] "Guaranine" "1,3,7-Trimethylxanthine"</span> <span class="r-out co"><span class="r-pr">#></span> [5] "Methyltheobromine" "Theine" </span> <span class="r-out co"><span class="r-pr">#></span> [7] "Thein" "Cafeina" </span> -<span class="r-out co"><span class="r-pr">#></span> [9] "Koffein" "Mateina" </span> +<span class="r-out co"><span class="r-pr">#></span> [9] "Caffein" "Cafipel" </span> <span class="r-in"><span><span class="kw">if</span> <span class="op">(</span><span class="op">!</span><span class="fu"><a href="https://rdrr.io/r/base/NULL.html" class="external-link">is.null</a></span><span class="op">(</span><span class="va">caffeine</span><span class="op">$</span><span class="va">Picture</span><span class="op">)</span><span class="op">)</span> <span class="op">{</span></span></span> <span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot</a></span><span class="op">(</span><span class="va">caffeine</span><span class="op">)</span></span></span> <span class="r-in"><span><span class="op">}</span></span></span> <span class="r-plt img"><img src="chent-1.png" alt="" width="700" height="433"></span> +<span class="r-in"><span><span class="va">oct</span> <span class="op"><-</span> <span class="va">chent</span><span class="op">$</span><span class="fu">new</span><span class="op">(</span><span class="st">"1-octanol"</span>, smiles <span class="op">=</span> <span class="st">"CCCCCCCCO"</span>, pubchem <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span></span></span> +<span class="r-msg co"><span class="r-pr">#></span> Get chemical information from RDKit using user SMILES</span> +<span class="r-msg co"><span class="r-pr">#></span> CCCCCCCCO</span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/print.html" class="external-link">print</a></span><span class="op">(</span><span class="va">oct</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> <chent></span> +<span class="r-out co"><span class="r-pr">#></span> Identifier $identifier 1-octanol </span> +<span class="r-out co"><span class="r-pr">#></span> InChI Key $inchikey NA </span> +<span class="r-out co"><span class="r-pr">#></span> SMILES string $smiles:</span> +<span class="r-out co"><span class="r-pr">#></span> user </span> +<span class="r-out co"><span class="r-pr">#></span> "CCCCCCCCO" </span> +<span class="r-out co"><span class="r-pr">#></span> Molecular weight $mw: 130.2 </span> +<span class="r-in"><span><span class="co"># }</span></span></span> </code></pre></div> </div> </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> @@ -809,7 +767,7 @@ Write an EMF image of the structure using <a href="https://rdrr.io/pkg/devEMF/ma </div> <div class="pkgdown-footer-right"> - <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.0.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.2.0.</p> </div> </footer></div> diff --git a/docs/reference/chent.md b/docs/reference/chent.md new file mode 100644 index 0000000..aeaac75 --- /dev/null +++ b/docs/reference/chent.md @@ -0,0 +1,802 @@ +# An R6 class for chemical entities with associated data + +The class is initialised with an identifier. Chemical information is +retrieved from the internet. Additionally, it can be generated using +RDKit if RDKit and its python bindings are installed. + +## Format + +An [R6Class](https://r6.r-lib.org/reference/R6Class.html) generator +object + +## Public fields + +- `identifier`: + + (`character(1)`) + The identifier that was used to initiate the object, with attribute + 'source' + +- `inchikey`: + + (`character(1)`) + InChI Key, with attribute 'source' + +- `smiles`: + + ([`character()`](https://rdrr.io/r/base/character.html)) + SMILES code(s), with attribute 'source' + +- `mw`: + + (`numeric(1)`) + Molecular weight, with attribute 'source' + +- `pubchem`: + + ([`list()`](https://rdrr.io/r/base/list.html)) + List of information retrieved from PubChem + +- `rdkit`: + + List of information obtained with RDKit + +- `mol`: + + \<rdkit.Chem.rdchem.Mol\> object + +- `svg`: + + SVG code + +- `Picture`: + + Graph as a + [grImport::Picture](https://rdrr.io/pkg/grImport/man/Picture-class.html) + object obtained using the grImport package + +- `Pict_font_size`: + + Font size as extracted from the intermediate PostScript file + +- `pdf_height`: + + Height of the MediaBox in the pdf after cropping + +- `p0`: + + Vapour pressure in Pa + +- `cwsat`: + + Water solubility in mg/L + +- `PUF`: + + Plant uptake factor + +- `chyaml`: + + List of information obtained from a YAML file + +- `TPs`: + + List of transformation products as chent objects + +- `transformations`: + + Data frame of observed transformations + +- `soil_degradation`: + + Dataframe of modelling DT50 values + +- `soil_ff`: + + Dataframe of formation fractions + +- `soil_sorption`: + + Dataframe of soil sorption data + +## Methods + +### Public methods + +- [`chent$new()`](#method-chent-initialize) + +- [`chent$try_pubchem()`](#method-chent-try_pubchem) + +- [`chent$get_pubchem()`](#method-chent-get_pubchem) + +- [`chent$get_rdkit()`](#method-chent-get_rdkit) + +- [`chent$get_chyaml()`](#method-chent-get_chyaml) + +- [`chent$add_p0()`](#method-chent-add_p0) + +- [`chent$add_cwsat()`](#method-chent-add_cwsat) + +- [`chent$add_PUF()`](#method-chent-add_PUF) + +- [`chent$add_TP()`](#method-chent-add_TP) + +- [`chent$add_transformation()`](#method-chent-add_transformation) + +- [`chent$add_soil_degradation()`](#method-chent-add_soil_degradation) + +- [`chent$add_soil_ff()`](#method-chent-add_soil_ff) + +- [`chent$add_soil_sorption()`](#method-chent-add_soil_sorption) + +- [`chent$pdf()`](#method-chent-pdf) + +- [`chent$png()`](#method-chent-png) + +- [`chent$emf()`](#method-chent-emf) + +- [`chent$clone()`](#method-chent-clone) + +------------------------------------------------------------------------ + +### `chent$new()` + +Creates a new instance of this +[R6](https://r6.r-lib.org/reference/R6Class.html) class. + +#### Usage + + chent$new( + identifier, + smiles = NULL, + inchikey = NULL, + pubchem = TRUE, + pubchem_from = c("name", "smiles", "inchikey"), + rdkit = TRUE, + template = NULL, + chyaml = FALSE + ) + +#### Arguments + +- `identifier`: + + Identifier to be stored in the object + +- `smiles`: + + Optional user provided SMILES code + +- `inchikey`: + + Optional user provided InChI Key + +- `pubchem`: + + Should an attempt be made to retrieve chemical information from + PubChem via the webchem package? + +- `pubchem_from`: + + Possibility to select the argument that is used to query pubchem + +- `rdkit`: + + Should an attempt be made to retrieve chemical information from a + local rdkit installation via python and the reticulate package? + +- `template`: + + An optional SMILES code to be used as template for RDKit + +- `chyaml`: + + Should we look for a identifier.yaml file in the working directory? + +------------------------------------------------------------------------ + +### `chent$try_pubchem()` + +Try to get chemical information from PubChem + +#### Usage + + chent$try_pubchem(query = self$identifier, from = "name") + +#### Arguments + +- `query`: + + Query string to be passed to + [get_cid](https://docs.ropensci.org/webchem/reference/get_cid.html) + +- `from`: + + Passed to + [get_cid](https://docs.ropensci.org/webchem/reference/get_cid.html) + +------------------------------------------------------------------------ + +### `chent$get_pubchem()` + +Get chemical information from PubChem for a known PubChem CID + +#### Usage + + chent$get_pubchem(pubchem_cid) + +#### Arguments + +- `pubchem_cid`: + + CID + +------------------------------------------------------------------------ + +### `chent$get_rdkit()` + +Get chemical information from RDKit if available + +#### Usage + + chent$get_rdkit(template = NULL) + +#### Arguments + +- `template`: + + An optional SMILES code to be used as template for RDKit + +------------------------------------------------------------------------ + +### `chent$get_chyaml()` + +Obtain information from a YAML file + +#### Usage + + chent$get_chyaml( + repo = c("wd", "local", "web"), + chyaml = paste0(URLencode(self$identifier), ".yaml") + ) + +#### Arguments + +- `repo`: + + Should the file be looked for in the current working directory, a + local git repository under `~/git/chyaml`, or from the web (not + implemented). + +- `chyaml`: + + The filename to be looked for + +------------------------------------------------------------------------ + +### `chent$add_p0()` + +Add a vapour pressure + +#### Usage + + chent$add_p0(p0, T = NA, source = NA, page = NA, remark = "") + +#### Arguments + +- `p0`: + + The vapour pressure in Pa + +- `T`: + + Temperature + +- `source`: + + An acronym specifying the source of the information + +- `page`: + + The page from which the information was taken + +- `remark`: + + A remark + +------------------------------------------------------------------------ + +### `chent$add_cwsat()` + +Add a water solubility + +#### Usage + + chent$add_cwsat(cwsat, T = NA, pH = NA, source = NA, page = NA, remark = "") + +#### Arguments + +- `cwsat`: + + The water solubility in mg/L + +- `T`: + + Temperature + +- `pH`: + + pH value + +- `source`: + + An acronym specifying the source of the information + +- `page`: + + The page from which the information was taken + +- `remark`: + + A remark + +------------------------------------------------------------------------ + +### `chent$add_PUF()` + +Add a plant uptake factor + +#### Usage + + chent$add_PUF( + PUF = 0, + source = "focus_generic_gw_2014", + page = 41, + remark = "Conservative default value" + ) + +#### Arguments + +- `PUF`: + + The plant uptake factor, a number between 0 and 1 + +- `source`: + + An acronym specifying the source of the information + +- `page`: + + The page from which the information was taken + +- `remark`: + + A remark + +------------------------------------------------------------------------ + +### `chent$add_TP()` + +Add a transformation product to the internal list + +#### Usage + + chent$add_TP(x, smiles = NULL, pubchem = FALSE) + +#### Arguments + +- `x`: + + A chent object, or an identifier to generate a chent object + +- `smiles`: + + Optional user provided SMILES code + +- `pubchem`: + + Should chemical information be obtained from PubChem? + +------------------------------------------------------------------------ + +### `chent$add_transformation()` + +Add a line in the internal dataframe holding observed transformations + +#### Usage + + chent$add_transformation( + study_type, + TP_identifier, + max_occurrence, + remark = "", + source = NA, + pages = NA + ) + +#### Arguments + +- `study_type`: + + A characterisation of the study type + +- `TP_identifier`: + + An identifier of one of the transformation products in `self$TPs` + +- `max_occurrence`: + + The maximum observed occurrence of the transformation product, + expressed as a fraction of the amount that would result from + stochiometric transformation + +- `remark`: + + A remark + +- `source`: + + An acronym specifying the source of the information + +- `pages`: + + The pages from which the information was taken + +------------------------------------------------------------------------ + +### `chent$add_soil_degradation()` + +Add a line in the internal dataframe holding modelling DT50 values + +#### Usage + + chent$add_soil_degradation( + soils, + DT50_mod, + DT50_mod_ref, + type = NA, + country = NA, + pH_orig = NA, + pH_medium = NA, + pH_H2O = NA, + perc_OC = NA, + temperature = NA, + moisture = NA, + category = "lab", + formulation = NA, + model = NA, + chi2 = NA, + remark = "", + source, + page = NA + ) + +#### Arguments + +- `soils`: + + Names of the soils + +- `DT50_mod`: + + The modelling DT50 in the sense of regulatory pesticide fate modelling + +- `DT50_mod_ref`: + + The normalised modelling DT50 in the sense of regulatory pesticide + fate modelling + +- `type`: + + The soil type + +- `country`: + + The country (mainly for field studies) + +- `pH_orig`: + + The pH stated in the study + +- `pH_medium`: + + The medium in which this pH was measured + +- `pH_H2O`: + + The pH extrapolated to pure water + +- `perc_OC`: + + The percentage of organic carbon in the soil + +- `temperature`: + + The temperature during the study in degrees Celsius + +- `moisture`: + + The moisture during the study + +- `category`: + + Is it a laboratory ('lab') or field study ('field') + +- `formulation`: + + Name of the formulation applied, if it was not the technical active + ingredient + +- `model`: + + The degradation model used for deriving `DT50_mod` + +- `chi2`: + + The relative error as defined in FOCUS kinetics + +- `remark`: + + A remark + +- `source`: + + An acronym specifying the source of the information + +- `page`: + + The page from which the information was taken + +------------------------------------------------------------------------ + +### `chent$add_soil_ff()` + +Add one or more formation fractions for degradation in soil + +#### Usage + + chent$add_soil_ff(target, soils, ff = 1, remark = "", source, page = NA) + +#### Arguments + +- `target`: + + The identifier(s) of the transformation product + +- `soils`: + + The soil name(s) in which the transformation was observed + +- `ff`: + + The formation fraction(s) + +- `remark`: + + A remark + +- `source`: + + An acronym specifying the source of the information + +- `page`: + + The page from which the information was taken + +------------------------------------------------------------------------ + +### `chent$add_soil_sorption()` + +Add soil sorption data + +#### Usage + + chent$add_soil_sorption( + soils, + Kf, + Kfoc, + N, + type = NA, + pH_orig = NA, + pH_medium = NA, + pH_H2O = NA, + perc_OC = NA, + perc_clay = NA, + CEC = NA, + remark = "", + source, + page = NA + ) + +#### Arguments + +- `soils`: + + Names of the soils + +- `Kf`: + + The sorption constant in L/kg, either linear (then `N` is 1) or + according to Freundlich + +- `Kfoc`: + + The constant from above, normalised to soil organic carbon + +- `N`: + + The Freundlich exponent + +- `type`: + + The soil type + +- `pH_orig`: + + The pH stated in the study + +- `pH_medium`: + + The medium in which this pH was measured + +- `pH_H2O`: + + The pH extrapolated to pure water + +- `perc_OC`: + + The percentage of organic carbon in the soil + +- `perc_clay`: + + The percentage of clay in the soil + +- `CEC`: + + The cation exchange capacity + +- `remark`: + + A remark + +- `source`: + + An acronym specifying the source of the information + +- `page`: + + The page from which the information was taken + +------------------------------------------------------------------------ + +### `chent$pdf()` + +Write a PDF image of the structure + +#### Usage + + chent$pdf( + file = paste0(self$identifier, ".pdf"), + dir = "structures/pdf", + template = NULL + ) + +#### Arguments + +- `file`: + + The file to write to + +- `dir`: + + The directory to write the file to + +- `template`: + + An optional SMILES code to be used as template for RDKit + +------------------------------------------------------------------------ + +### `chent$png()` + +Write a PNG image of the structure + +#### Usage + + chent$png( + file = paste0(self$identifier, ".png"), + dir = "structures/png", + antialias = "gray" + ) + +#### Arguments + +- `file`: + + The file to write to + +- `dir`: + + The directory to write the file to + +- `antialias`: + + Passed to [png](https://rdrr.io/r/grDevices/png.html) + +------------------------------------------------------------------------ + +### `chent$emf()` + +Write an EMF image of the structure using +[emf](https://rdrr.io/pkg/devEMF/man/emf.html) + +#### Usage + + chent$emf(file = paste0(self$identifier, ".emf"), dir = "structures/emf") + +#### Arguments + +- `file`: + + The file to write to + +- `dir`: + + The directory to write the file to + +------------------------------------------------------------------------ + +### `chent$clone()` + +The objects of this class are cloneable with this method. + +#### Usage + + chent$clone(deep = FALSE) + +#### Arguments + +- `deep`: + + Whether to make a deep clone. + +## Examples + +``` r +# Don't run examples per default, as PubChem may be unavailable +# \dontrun{ +caffeine <- chent$new("caffeine") +#> Querying PubChem for name caffeine ... +#> Get chemical information from RDKit using PubChem SMILES +#> CN1C=NC2=C1C(=O)N(C(=O)N2C)C +print(caffeine) +#> <chent> +#> Identifier $identifier caffeine +#> InChI Key $inchikey RYYVLZVUVIJVGH-UHFFFAOYSA-N +#> SMILES string $smiles: +#> PubChem +#> "CN1C=NC2=C1C(=O)N(C(=O)N2C)C" +#> Molecular weight $mw: 194.2 +#> PubChem synonyms (up to 10): +#> [1] "caffeine" "58-08-2" +#> [3] "Guaranine" "1,3,7-Trimethylxanthine" +#> [5] "Methyltheobromine" "Theine" +#> [7] "Thein" "Cafeina" +#> [9] "Caffein" "Cafipel" +if (!is.null(caffeine$Picture)) { + plot(caffeine) +} + +oct <- chent$new("1-octanol", smiles = "CCCCCCCCO", pubchem = FALSE) +#> Get chemical information from RDKit using user SMILES +#> CCCCCCCCO +print(oct) +#> <chent> +#> Identifier $identifier 1-octanol +#> InChI Key $inchikey NA +#> SMILES string $smiles: +#> user +#> "CCCCCCCCO" +#> Molecular weight $mw: 130.2 +# } +``` diff --git a/docs/reference/draw_svg.chent.html b/docs/reference/draw_svg.chent.html index 6a6741f..8bea16c 100644 --- a/docs/reference/draw_svg.chent.html +++ b/docs/reference/draw_svg.chent.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Draw SVG graph from a chent object using RDKit — draw_svg.chent • chents</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.4.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.4.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Draw SVG graph from a chent object using RDKit — draw_svg.chent"><meta name="description" content="Draw SVG graph from a chent object using RDKit"><meta property="og:description" content="Draw SVG graph from a chent object using RDKit"></head><body> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Draw SVG graph from a chent object using RDKit — draw_svg.chent • chents</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Draw SVG graph from a chent object using RDKit — draw_svg.chent"><meta name="description" content="Draw SVG graph from a chent object using RDKit"><meta property="og:description" content="Draw SVG graph from a chent object using RDKit"></head><body> <a href="#main" class="visually-hidden-focusable">Skip to contents</a> @@ -7,7 +7,7 @@ <a class="navbar-brand me-2" href="../index.html">chents</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.3.6</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.4.2</small> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> @@ -82,7 +82,7 @@ </div> <div class="pkgdown-footer-right"> - <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.0.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.2.0.</p> </div> </footer></div> diff --git a/docs/reference/draw_svg.chent.md b/docs/reference/draw_svg.chent.md new file mode 100644 index 0000000..7b43988 --- /dev/null +++ b/docs/reference/draw_svg.chent.md @@ -0,0 +1,37 @@ +# Draw SVG graph from a chent object using RDKit + +Draw SVG graph from a chent object using RDKit + +## Usage + +``` r +draw_svg.chent( + x, + width = 300, + height = 150, + filename = paste0(names(x$identifier), ".svg"), + subdir = "svg" +) +``` + +## Arguments + +- x: + + The chent object to be plotted + +- width: + + The desired width in pixels + +- height: + + The desired height in pixels + +- filename: + + The filename + +- subdir: + + The path to which the file should be written diff --git a/docs/reference/figures/README-caffeine-1.png b/docs/reference/figures/README-caffeine-1.png Binary files differnew file mode 100644 index 0000000..aadb576 --- /dev/null +++ b/docs/reference/figures/README-caffeine-1.png diff --git a/docs/reference/figures/README-plot-caffeine-1.png b/docs/reference/figures/README-plot-caffeine-1.png Binary files differnew file mode 100644 index 0000000..21caae7 --- /dev/null +++ b/docs/reference/figures/README-plot-caffeine-1.png diff --git a/docs/reference/figures/README-unnamed-chunk-3-1.png b/docs/reference/figures/README-unnamed-chunk-3-1.png Binary files differnew file mode 100644 index 0000000..9646595 --- /dev/null +++ b/docs/reference/figures/README-unnamed-chunk-3-1.png diff --git a/docs/reference/figures/README-unnamed-chunk-4-1.png b/docs/reference/figures/README-unnamed-chunk-4-1.png Binary files differnew file mode 100644 index 0000000..7e7352d --- /dev/null +++ b/docs/reference/figures/README-unnamed-chunk-4-1.png diff --git a/docs/reference/figures/README-unnamed-chunk-5-1.png b/docs/reference/figures/README-unnamed-chunk-5-1.png Binary files differnew file mode 100644 index 0000000..7e7352d --- /dev/null +++ b/docs/reference/figures/README-unnamed-chunk-5-1.png diff --git a/docs/reference/figures/README-unnamed-chunk-6-1.png b/docs/reference/figures/README-unnamed-chunk-6-1.png Binary files differnew file mode 100644 index 0000000..bf6cdb4 --- /dev/null +++ b/docs/reference/figures/README-unnamed-chunk-6-1.png diff --git a/docs/reference/index.html b/docs/reference/index.html index 12b0201..929f683 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Package index • chents</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.4.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.4.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Package index"></head><body> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Package index • chents</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Package index"></head><body> <a href="#main" class="visually-hidden-focusable">Skip to contents</a> @@ -7,7 +7,7 @@ <a class="navbar-brand me-2" href="../index.html">chents</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.3.6</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.4.2</small> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> @@ -36,8 +36,7 @@ - - </div><div class="section level2"> + <dl></dl></div><div class="section level2"> @@ -48,42 +47,55 @@ </dt> <dd>An R6 class for chemical entities with associated data</dd> - </dl><dl><dt> + + <dt> + + <code><a href="pai.html">pai</a></code> + + </dt> + <dd>An R6 class for pesticidal active ingredients and associated data</dd> + + <dt> + + <code><a href="ppp.html">ppp</a></code> + + </dt> + <dd>R6 class for a plant protection product with at least one active ingredient</dd> + + <dt> <code><a href="draw_svg.chent.html">draw_svg.chent()</a></code> </dt> <dd>Draw SVG graph from a chent object using RDKit</dd> - </dl><dl><dt> + + <dt> <code><a href="plot.chent.html">plot(<i><chent></i>)</a></code> </dt> <dd>Plot method for chent objects</dd> - </dl><dl><dt> + + <dt> <code><a href="print.chent.html">print(<i><chent></i>)</a></code> </dt> <dd>Printing method for chent objects</dd> - </dl><dl><dt> - <code><a href="pai.html">pai</a></code> - - </dt> - <dd>An R6 class for pesticidal active ingredients and associated data</dd> - </dl><dl><dt> + <dt> <code><a href="print.pai.html">print(<i><pai></i>)</a></code> </dt> <dd>Printing method for pai objects (pesticidal active ingredients)</dd> - </dl><dl><dt> - <code><a href="ppp.html">ppp</a></code> + <dt> + + <code><a href="print.ppp.html">print(<i><ppp></i>)</a></code> </dt> - <dd>R6 class for a plant protection product with at least one active ingredient</dd> + <dd>Printing method for ppp objects (plant protection products)</dd> </dl></div> </main></div> @@ -93,7 +105,7 @@ </div> <div class="pkgdown-footer-right"> - <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.0.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.2.0.</p> </div> </footer></div> diff --git a/docs/reference/index.md b/docs/reference/index.md new file mode 100644 index 0000000..c927189 --- /dev/null +++ b/docs/reference/index.md @@ -0,0 +1,20 @@ +# Package index + +## R6 Class definitions and methods + +- [`chent`](https://pkgdown.jrwb.de/chents/reference/chent.md) : An R6 + class for chemical entities with associated data +- [`pai`](https://pkgdown.jrwb.de/chents/reference/pai.md) : An R6 class + for pesticidal active ingredients and associated data +- [`ppp`](https://pkgdown.jrwb.de/chents/reference/ppp.md) : R6 class + for a plant protection product with at least one active ingredient +- [`draw_svg.chent()`](https://pkgdown.jrwb.de/chents/reference/draw_svg.chent.md) + : Draw SVG graph from a chent object using RDKit +- [`plot(`*`<chent>`*`)`](https://pkgdown.jrwb.de/chents/reference/plot.chent.md) + : Plot method for chent objects +- [`print(`*`<chent>`*`)`](https://pkgdown.jrwb.de/chents/reference/print.chent.md) + : Printing method for chent objects +- [`print(`*`<pai>`*`)`](https://pkgdown.jrwb.de/chents/reference/print.pai.md) + : Printing method for pai objects (pesticidal active ingredients) +- [`print(`*`<ppp>`*`)`](https://pkgdown.jrwb.de/chents/reference/print.ppp.md) + : Printing method for ppp objects (plant protection products) diff --git a/docs/reference/pai-1.png b/docs/reference/pai-1.png Binary files differindex c567bc2..802fd50 100644 --- a/docs/reference/pai-1.png +++ b/docs/reference/pai-1.png diff --git a/docs/reference/pai.html b/docs/reference/pai.html index 96c6782..269a1d2 100644 --- a/docs/reference/pai.html +++ b/docs/reference/pai.html @@ -1,9 +1,13 @@ <!DOCTYPE html> -<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>An R6 class for pesticidal active ingredients and associated data — pai • chents</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.4.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.4.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="An R6 class for pesticidal active ingredients and associated data — pai"><meta name="description" content="The class is initialised with an identifier which is generally -an ISO common name. Additional chemical information is retrieved from the -internet if available."><meta property="og:description" content="The class is initialised with an identifier which is generally -an ISO common name. Additional chemical information is retrieved from the -internet if available."></head><body> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>An R6 class for pesticidal active ingredients and associated data — pai • chents</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="An R6 class for pesticidal active ingredients and associated data — pai"><meta name="description" content="This class is derived from chent. It makes it easy +to create a chent from the ISO common name of a pesticide active +ingredient, and additionally stores the ISO name as well as +the complete result of querying the BCPC compendium using +bcpc_query."><meta property="og:description" content="This class is derived from chent. It makes it easy +to create a chent from the ISO common name of a pesticide active +ingredient, and additionally stores the ISO name as well as +the complete result of querying the BCPC compendium using +bcpc_query."></head><body> <a href="#main" class="visually-hidden-focusable">Skip to contents</a> @@ -11,7 +15,7 @@ internet if available."></head><body> <a class="navbar-brand me-2" href="../index.html">chents</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.3.6</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.4.2</small> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> @@ -38,19 +42,21 @@ internet if available."></head><body> </div> <div class="ref-description section level2"> - <p>The class is initialised with an identifier which is generally -an ISO common name. Additional chemical information is retrieved from the -internet if available.</p> + <p>This class is derived from <a href="chent.html">chent</a>. It makes it easy +to create a <a href="chent.html">chent</a> from the ISO common name of a pesticide active +ingredient, and additionally stores the ISO name as well as +the complete result of querying the BCPC compendium using +<a href="https://docs.ropensci.org/webchem/reference/bcpc_query.html" class="external-link">bcpc_query</a>.</p> </div> <div class="section level2"> <h2 id="format">Format<a class="anchor" aria-label="anchor" href="#format"></a></h2> - <p>An <code>R6Class</code> generator object</p> + <p>An <a href="https://r6.r-lib.org/reference/R6Class.html" class="external-link">R6::R6Class</a> generator object</p> </div> <div class="section level2"> <h2 id="super-class">Super class<a class="anchor" aria-label="anchor" href="#super-class"></a></h2> - <p><code><a href="chent.html">chents::chent</a></code> -> <code>pai</code></p> + <p><code><a href="chent.html">chent</a></code> -> <code>pai</code></p> </div> <div class="section level2"> <h2 id="public-fields">Public fields<a class="anchor" aria-label="anchor" href="#public-fields"></a></h2> @@ -58,10 +64,9 @@ internet if available.</p> <dd><p>ISO common name of the active ingredient according to ISO 1750</p></dd> -<dt><code>bcpc</code></dt> + <dt><code>bcpc</code></dt> <dd><p>Information retrieved from the BCPC compendium available online -at <pesticidecompendium.bcpc.org> -Creates a new instance of this <a href="https://r6.r-lib.org/reference/R6Class.html" class="external-link">R6</a> class.</p></dd> +at <pesticidecompendium.bcpc.org></p></dd> </dl><p></p></div> @@ -71,31 +76,26 @@ Creates a new instance of this <a href="https://r6.r-lib.org/reference/R6Class.h <div class="section"> <h3 id="public-methods">Public methods<a class="anchor" aria-label="anchor" href="#public-methods"></a></h3> - -<ul><li><p><a href="#method-pai-new"><code>pai$new()</code></a></p></li> +<p></p><ul><li><p><a href="#method-pai-initialize"><code>pai$new()</code></a></p></li> <li><p><a href="#method-pai-clone"><code>pai$clone()</code></a></p></li> -</ul></div><p><details><summary>Inherited methods</summary><ul><li><span class="pkg-link" data-pkg="chents" data-topic="chent" data-id="add_PUF"><a href="chent.html#method-add_PUF"><code>chents::chent$add_PUF()</code></a></span></li> -<li><span class="pkg-link" data-pkg="chents" data-topic="chent" data-id="add_TP"><a href="chent.html#method-add_TP"><code>chents::chent$add_TP()</code></a></span></li> -<li><span class="pkg-link" data-pkg="chents" data-topic="chent" data-id="add_cwsat"><a href="chent.html#method-add_cwsat"><code>chents::chent$add_cwsat()</code></a></span></li> -<li><span class="pkg-link" data-pkg="chents" data-topic="chent" data-id="add_p0"><a href="chent.html#method-add_p0"><code>chents::chent$add_p0()</code></a></span></li> -<li><span class="pkg-link" data-pkg="chents" data-topic="chent" data-id="add_soil_degradation"><a href="chent.html#method-add_soil_degradation"><code>chents::chent$add_soil_degradation()</code></a></span></li> -<li><span class="pkg-link" data-pkg="chents" data-topic="chent" data-id="add_soil_ff"><a href="chent.html#method-add_soil_ff"><code>chents::chent$add_soil_ff()</code></a></span></li> -<li><span class="pkg-link" data-pkg="chents" data-topic="chent" data-id="add_soil_sorption"><a href="chent.html#method-add_soil_sorption"><code>chents::chent$add_soil_sorption()</code></a></span></li> -<li><span class="pkg-link" data-pkg="chents" data-topic="chent" data-id="add_transformation"><a href="chent.html#method-add_transformation"><code>chents::chent$add_transformation()</code></a></span></li> -<li><span class="pkg-link" data-pkg="chents" data-topic="chent" data-id="emf"><a href="chent.html#method-emf"><code>chents::chent$emf()</code></a></span></li> -<li><span class="pkg-link" data-pkg="chents" data-topic="chent" data-id="get_chyaml"><a href="chent.html#method-get_chyaml"><code>chents::chent$get_chyaml()</code></a></span></li> -<li><span class="pkg-link" data-pkg="chents" data-topic="chent" data-id="get_pubchem"><a href="chent.html#method-get_pubchem"><code>chents::chent$get_pubchem()</code></a></span></li> -<li><span class="pkg-link" data-pkg="chents" data-topic="chent" data-id="get_rdkit"><a href="chent.html#method-get_rdkit"><code>chents::chent$get_rdkit()</code></a></span></li> -<li><span class="pkg-link" data-pkg="chents" data-topic="chent" data-id="pdf"><a href="chent.html#method-pdf"><code>chents::chent$pdf()</code></a></span></li> -<li><span class="pkg-link" data-pkg="chents" data-topic="chent" data-id="png"><a href="chent.html#method-png"><code>chents::chent$png()</code></a></span></li> -<li><span class="pkg-link" data-pkg="chents" data-topic="chent" data-id="try_pubchem"><a href="chent.html#method-try_pubchem"><code>chents::chent$try_pubchem()</code></a></span></li> -</ul></details></p><hr><a id="method-pai-new"></a><div class="section"> -<h3 id="method-new-">Method <code>new()</code><a class="anchor" aria-label="anchor" href="#method-new-"></a></h3> -<p>This class is derived from <a href="chent.html">chent</a>. It makes it easy -to create a <a href="chent.html">chent</a> from the ISO common name of a pesticide active -ingredient, and additionally stores the ISO name as well as -the complete result of querying the BCPC compendium using -<a href="https://docs.ropensci.org/webchem/reference/bcpc_query.html" class="external-link">bcpc_query</a>.</p><div class="section"> +</ul></div><p><details><summary>Inherited methods</summary><ul><li><span class="pkg-link" data-pkg="chents" data-topic="chent" data-id="add_PUF"><a href="chent.html#method-add_PUF"><code>chent$add_PUF()</code></a></span></li> + <li><span class="pkg-link" data-pkg="chents" data-topic="chent" data-id="add_TP"><a href="chent.html#method-add_TP"><code>chent$add_TP()</code></a></span></li> + <li><span class="pkg-link" data-pkg="chents" data-topic="chent" data-id="add_cwsat"><a href="chent.html#method-add_cwsat"><code>chent$add_cwsat()</code></a></span></li> + <li><span class="pkg-link" data-pkg="chents" data-topic="chent" data-id="add_p0"><a href="chent.html#method-add_p0"><code>chent$add_p0()</code></a></span></li> + <li><span class="pkg-link" data-pkg="chents" data-topic="chent" data-id="add_soil_degradation"><a href="chent.html#method-add_soil_degradation"><code>chent$add_soil_degradation()</code></a></span></li> + <li><span class="pkg-link" data-pkg="chents" data-topic="chent" data-id="add_soil_ff"><a href="chent.html#method-add_soil_ff"><code>chent$add_soil_ff()</code></a></span></li> + <li><span class="pkg-link" data-pkg="chents" data-topic="chent" data-id="add_soil_sorption"><a href="chent.html#method-add_soil_sorption"><code>chent$add_soil_sorption()</code></a></span></li> + <li><span class="pkg-link" data-pkg="chents" data-topic="chent" data-id="add_transformation"><a href="chent.html#method-add_transformation"><code>chent$add_transformation()</code></a></span></li> + <li><span class="pkg-link" data-pkg="chents" data-topic="chent" data-id="emf"><a href="chent.html#method-emf"><code>chent$emf()</code></a></span></li> + <li><span class="pkg-link" data-pkg="chents" data-topic="chent" data-id="get_chyaml"><a href="chent.html#method-get_chyaml"><code>chent$get_chyaml()</code></a></span></li> + <li><span class="pkg-link" data-pkg="chents" data-topic="chent" data-id="get_pubchem"><a href="chent.html#method-get_pubchem"><code>chent$get_pubchem()</code></a></span></li> + <li><span class="pkg-link" data-pkg="chents" data-topic="chent" data-id="get_rdkit"><a href="chent.html#method-get_rdkit"><code>chent$get_rdkit()</code></a></span></li> + <li><span class="pkg-link" data-pkg="chents" data-topic="chent" data-id="pdf"><a href="chent.html#method-pdf"><code>chent$pdf()</code></a></span></li> + <li><span class="pkg-link" data-pkg="chents" data-topic="chent" data-id="png"><a href="chent.html#method-png"><code>chent$png()</code></a></span></li> + <li><span class="pkg-link" data-pkg="chents" data-topic="chent" data-id="try_pubchem"><a href="chent.html#method-try_pubchem"><code>chent$try_pubchem()</code></a></span></li> +</ul></details></p><hr><a id="method-pai-initialize"></a><div class="section"> +<h3 id="pai-new-"><code>pai$new()</code><a class="anchor" aria-label="anchor" href="#pai-new-"></a></h3> +<p>Create a new pai object</p><div class="section"> <h4 id="usage">Usage<a class="anchor" aria-label="anchor" href="#usage"></a></h4> <p></p><div class="r"><div class="sourceCode"><pre><code><span><span class="va"><a href="../reference/pai.html">pai</a></span><span class="op">$</span><span class="fu">new</span><span class="op">(</span></span> <span> <span class="va">iso</span>,</span> @@ -107,32 +107,57 @@ the complete result of querying the BCPC compendium using <span> pubchem_from <span class="op">=</span> <span class="st">"auto"</span>,</span> <span> rdkit <span class="op">=</span> <span class="cn">TRUE</span>,</span> <span> template <span class="op">=</span> <span class="cn">NULL</span>,</span> -<span> chyaml <span class="op">=</span> <span class="cn">TRUE</span></span> +<span> chyaml <span class="op">=</span> <span class="cn">FALSE</span></span> <span><span class="op">)</span></span></code></pre></div><p></p></div> -</div> - -<div class="section"> +</div><p></p><div class="section"> <h4 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h4> <p></p><div class="arguments"><dl><dt><code>iso</code></dt> <dd><p>The ISO common name to be used in the query of the BCPC compendium</p></dd> - -<dt><code>identifier</code></dt> + <dt><code>identifier</code></dt> <dd><p>Alternative identifier used for querying pubchem</p></dd> + <dt><code>smiles</code></dt> +<dd><p>Optional user provided SMILES code</p></dd> + + <dt><code>inchikey</code></dt> +<dd><p>Optional user provided InChI Key</p></dd> + + <dt><code>bcpc</code></dt> +<dd><p>Should the BCPC compendium be queried?</p></dd> + + <dt><code>pubchem</code></dt> +<dd><p>Should an attempt be made to retrieve chemical +information from PubChem via the webchem package?</p></dd> + + <dt><code>pubchem_from</code></dt> +<dd><p>Possibility to select the argument +that is used to query pubchem</p></dd> + + <dt><code>rdkit</code></dt> +<dd><p>Should an attempt be made to retrieve chemical +information from a local rdkit installation via python +and the reticulate package?</p></dd> + + <dt><code>template</code></dt> +<dd><p>An optional SMILES code to be used as template for RDKit</p></dd> + + <dt><code>chyaml</code></dt> +<dd><p>Should we look for a identifier.yaml file in the working</p></dd> + </dl><p></p></div> </div> -</div><p></p><hr><a id="method-pai-clone"></a><div class="section"> -<h3 id="method-clone-">Method <code>clone()</code><a class="anchor" aria-label="anchor" href="#method-clone-"></a></h3> +</div> + +<p></p><hr><a id="method-pai-clone"></a><div class="section"> +<h3 id="pai-clone-"><code>pai$clone()</code><a class="anchor" aria-label="anchor" href="#pai-clone-"></a></h3> <p>The objects of this class are cloneable with this method.</p><div class="section"> <h4 id="usage-1">Usage<a class="anchor" aria-label="anchor" href="#usage-1"></a></h4> <p></p><div class="r"><div class="sourceCode"><pre><code><span><span class="va">pai</span><span class="op">$</span><span class="fu">clone</span><span class="op">(</span>deep <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span></span></code></pre></div><p></p></div> -</div> - -<div class="section"> +</div><p></p><div class="section"> <h4 id="arguments-1">Arguments<a class="anchor" aria-label="anchor" href="#arguments-1"></a></h4> <p></p><div class="arguments"><dl><dt><code>deep</code></dt> <dd><p>Whether to make a deep clone.</p></dd> @@ -143,39 +168,55 @@ BCPC compendium</p></dd> </div> + </div> <div class="section level2"> <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> - <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="co"># On Travis, we get a certificate validation error,</span></span></span> -<span class="r-in"><span><span class="co"># likely because the system (xenial) is so old,</span></span></span> -<span class="r-in"><span><span class="co"># therefore don't run this example on Travis</span></span></span> -<span class="r-in"><span><span class="kw">if</span> <span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/Sys.getenv.html" class="external-link">Sys.getenv</a></span><span class="op">(</span><span class="st">"TRAVIS"</span><span class="op">)</span> <span class="op">==</span> <span class="st">""</span><span class="op">)</span> <span class="op">{</span></span></span> -<span class="r-in"><span></span></span> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="co"># Don't run examples per default, as PubChem may be unavailable</span></span></span> +<span class="r-in"><span><span class="co"># \dontrun{</span></span></span> <span class="r-in"><span><span class="va">atr</span> <span class="op"><-</span> <span class="va">pai</span><span class="op">$</span><span class="fu">new</span><span class="op">(</span><span class="st">"atrazine"</span><span class="op">)</span></span></span> -<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/print.html" class="external-link">print</a></span><span class="op">(</span><span class="va">atr</span><span class="op">)</span></span></span> -<span class="r-in"><span><span class="kw">if</span> <span class="op">(</span><span class="op">!</span><span class="fu"><a href="https://rdrr.io/r/base/NULL.html" class="external-link">is.null</a></span><span class="op">(</span><span class="va">atr</span><span class="op">$</span><span class="va">Picture</span><span class="op">)</span><span class="op">)</span> <span class="op">{</span></span></span> -<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot</a></span><span class="op">(</span><span class="va">atr</span><span class="op">)</span></span></span> -<span class="r-in"><span><span class="op">}</span></span></span> -<span class="r-in"><span></span></span> -<span class="r-in"><span><span class="op">}</span></span></span> -<span class="r-msg co"><span class="r-pr">#></span> BCPC:</span> -<span class="r-msg co"><span class="r-pr">#></span> PubChem:</span> -<span class="r-msg co"><span class="r-pr">#></span> Trying to get chemical information from RDKit using PubChem_Canonical SMILES</span> +<span class="r-msg co"><span class="r-pr">#></span> Querying BCPC for atrazine ...</span> +<span class="r-msg co"><span class="r-pr">#></span> Querying PubChem for inchikey MXWJVTOOROXGIU-UHFFFAOYSA-N ...</span> +<span class="r-msg co"><span class="r-pr">#></span> Get chemical information from RDKit using PubChem SMILES</span> <span class="r-msg co"><span class="r-pr">#></span> CCNC1=NC(=NC(=N1)Cl)NC(C)C</span> -<span class="r-msg co"><span class="r-pr">#></span> Did not find chyaml file ./atrazine.yaml</span> -<span class="r-plt img"><img src="pai-1.png" alt="" width="700" height="433"></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/print.html" class="external-link">print</a></span><span class="op">(</span><span class="va">atr</span><span class="op">)</span></span></span> <span class="r-out co"><span class="r-pr">#></span> <pai> with ISO common name $iso atrazine </span> <span class="r-out co"><span class="r-pr">#></span> <chent></span> <span class="r-out co"><span class="r-pr">#></span> Identifier $identifier atrazine </span> <span class="r-out co"><span class="r-pr">#></span> InChI Key $inchikey MXWJVTOOROXGIU-UHFFFAOYSA-N </span> <span class="r-out co"><span class="r-pr">#></span> SMILES string $smiles:</span> -<span class="r-out co"><span class="r-pr">#></span> PubChem_Canonical </span> +<span class="r-out co"><span class="r-pr">#></span> PubChem </span> <span class="r-out co"><span class="r-pr">#></span> "CCNC1=NC(=NC(=N1)Cl)NC(C)C" </span> <span class="r-out co"><span class="r-pr">#></span> Molecular weight $mw: 215.7 </span> <span class="r-out co"><span class="r-pr">#></span> PubChem synonyms (up to 10):</span> -<span class="r-out co"><span class="r-pr">#></span> [1] "atrazine" "1912-24-9" "Gesaprim" "Atranex" "Oleogesaprim"</span> -<span class="r-out co"><span class="r-pr">#></span> [6] "Atazinax" "Atrasine" "Chromozin" "Gesoprim" "Hungazin" </span> +<span class="r-out co"><span class="r-pr">#></span> [1] "atrazine" "1912-24-9" "Gesaprim" "Aatrex" "Atranex" </span> +<span class="r-out co"><span class="r-pr">#></span> [6] "Atrazin" "Oleogesaprim" "Atazinax" "Atrasine" "Chromozin" </span> +<span class="r-in"><span><span class="kw">if</span> <span class="op">(</span><span class="op">!</span><span class="fu"><a href="https://rdrr.io/r/base/NULL.html" class="external-link">is.null</a></span><span class="op">(</span><span class="va">atr</span><span class="op">$</span><span class="va">Picture</span><span class="op">)</span><span class="op">)</span> <span class="op">{</span></span></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot</a></span><span class="op">(</span><span class="va">atr</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="op">}</span></span></span> +<span class="r-plt img"><img src="pai-1.png" alt="" width="700" height="433"></span> +<span class="r-in"><span><span class="co"># We can also define pais that are not found on the BCPC site</span></span></span> +<span class="r-in"><span><span class="va">decanol</span> <span class="op"><-</span> <span class="va">pai</span><span class="op">$</span><span class="fu">new</span><span class="op">(</span><span class="st">"1-Decanol"</span><span class="op">)</span></span></span> +<span class="r-msg co"><span class="r-pr">#></span> Querying BCPC for 1-Decanol ...</span> +<span class="r-msg co"><span class="r-pr">#></span> Common name 1-Decanol is not known at the BCPC compendium, trying PubChem</span> +<span class="r-msg co"><span class="r-pr">#></span> Querying PubChem for name 1-Decanol ...</span> +<span class="r-msg co"><span class="r-pr">#></span> Get chemical information from RDKit using PubChem SMILES</span> +<span class="r-msg co"><span class="r-pr">#></span> CCCCCCCCCCO</span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/print.html" class="external-link">print</a></span><span class="op">(</span><span class="va">decanol</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> <pai> without ISO common name</span> +<span class="r-out co"><span class="r-pr">#></span> <chent></span> +<span class="r-out co"><span class="r-pr">#></span> Identifier $identifier 1-Decanol </span> +<span class="r-out co"><span class="r-pr">#></span> InChI Key $inchikey MWKFXSUHUHTGQN-UHFFFAOYSA-N </span> +<span class="r-out co"><span class="r-pr">#></span> SMILES string $smiles:</span> +<span class="r-out co"><span class="r-pr">#></span> PubChem </span> +<span class="r-out co"><span class="r-pr">#></span> "CCCCCCCCCCO" </span> +<span class="r-out co"><span class="r-pr">#></span> Molecular weight $mw: 158.3 </span> +<span class="r-out co"><span class="r-pr">#></span> PubChem synonyms (up to 10):</span> +<span class="r-out co"><span class="r-pr">#></span> [1] "1-DECANOL" "Decyl alcohol" "Decan-1-ol" "112-30-1" </span> +<span class="r-out co"><span class="r-pr">#></span> [5] "n-Decyl alcohol" "n-Decanol" "Capric alcohol" "Nonylcarbinol" </span> +<span class="r-out co"><span class="r-pr">#></span> [9] "Antak" "Royaltac" </span> +<span class="r-in"><span><span class="co"># }</span></span></span> </code></pre></div> </div> </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> @@ -187,7 +228,7 @@ BCPC compendium</p></dd> </div> <div class="pkgdown-footer-right"> - <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.0.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.2.0.</p> </div> </footer></div> diff --git a/docs/reference/pai.md b/docs/reference/pai.md new file mode 100644 index 0000000..b957cb2 --- /dev/null +++ b/docs/reference/pai.md @@ -0,0 +1,186 @@ +# An R6 class for pesticidal active ingredients and associated data + +This class is derived from +[chent](https://pkgdown.jrwb.de/chents/reference/chent.md). It makes it +easy to create a +[chent](https://pkgdown.jrwb.de/chents/reference/chent.md) from the ISO +common name of a pesticide active ingredient, and additionally stores +the ISO name as well as the complete result of querying the BCPC +compendium using +[bcpc_query](https://docs.ropensci.org/webchem/reference/bcpc_query.html). + +## Format + +An [R6::R6Class](https://r6.r-lib.org/reference/R6Class.html) generator +object + +## Super class + +[`chent`](https://pkgdown.jrwb.de/chents/reference/chent.md) -\> `pai` + +## Public fields + +- `iso`: + + ISO common name of the active ingredient according to ISO 1750 + +- `bcpc`: + + Information retrieved from the BCPC compendium available online at + \<pesticidecompendium.bcpc.org\> + +## Methods + +### Public methods + +- [`pai$new()`](#method-pai-initialize) + +- [`pai$clone()`](#method-pai-clone) + +Inherited methods + +- [`chent$add_PUF()`](https://pkgdown.jrwb.de/chents/reference/chent.html#method-add_PUF) +- [`chent$add_TP()`](https://pkgdown.jrwb.de/chents/reference/chent.html#method-add_TP) +- [`chent$add_cwsat()`](https://pkgdown.jrwb.de/chents/reference/chent.html#method-add_cwsat) +- [`chent$add_p0()`](https://pkgdown.jrwb.de/chents/reference/chent.html#method-add_p0) +- [`chent$add_soil_degradation()`](https://pkgdown.jrwb.de/chents/reference/chent.html#method-add_soil_degradation) +- [`chent$add_soil_ff()`](https://pkgdown.jrwb.de/chents/reference/chent.html#method-add_soil_ff) +- [`chent$add_soil_sorption()`](https://pkgdown.jrwb.de/chents/reference/chent.html#method-add_soil_sorption) +- [`chent$add_transformation()`](https://pkgdown.jrwb.de/chents/reference/chent.html#method-add_transformation) +- [`chent$emf()`](https://pkgdown.jrwb.de/chents/reference/chent.html#method-emf) +- [`chent$get_chyaml()`](https://pkgdown.jrwb.de/chents/reference/chent.html#method-get_chyaml) +- [`chent$get_pubchem()`](https://pkgdown.jrwb.de/chents/reference/chent.html#method-get_pubchem) +- [`chent$get_rdkit()`](https://pkgdown.jrwb.de/chents/reference/chent.html#method-get_rdkit) +- [`chent$pdf()`](https://pkgdown.jrwb.de/chents/reference/chent.html#method-pdf) +- [`chent$png()`](https://pkgdown.jrwb.de/chents/reference/chent.html#method-png) +- [`chent$try_pubchem()`](https://pkgdown.jrwb.de/chents/reference/chent.html#method-try_pubchem) + +------------------------------------------------------------------------ + +### `pai$new()` + +Create a new pai object + +#### Usage + + pai$new( + iso, + identifier = iso, + smiles = NULL, + inchikey = NULL, + bcpc = TRUE, + pubchem = TRUE, + pubchem_from = "auto", + rdkit = TRUE, + template = NULL, + chyaml = FALSE + ) + +#### Arguments + +- `iso`: + + The ISO common name to be used in the query of the BCPC compendium + +- `identifier`: + + Alternative identifier used for querying pubchem + +- `smiles`: + + Optional user provided SMILES code + +- `inchikey`: + + Optional user provided InChI Key + +- `bcpc`: + + Should the BCPC compendium be queried? + +- `pubchem`: + + Should an attempt be made to retrieve chemical information from + PubChem via the webchem package? + +- `pubchem_from`: + + Possibility to select the argument that is used to query pubchem + +- `rdkit`: + + Should an attempt be made to retrieve chemical information from a + local rdkit installation via python and the reticulate package? + +- `template`: + + An optional SMILES code to be used as template for RDKit + +- `chyaml`: + + Should we look for a identifier.yaml file in the working + +------------------------------------------------------------------------ + +### `pai$clone()` + +The objects of this class are cloneable with this method. + +#### Usage + + pai$clone(deep = FALSE) + +#### Arguments + +- `deep`: + + Whether to make a deep clone. + +## Examples + +``` r +# Don't run examples per default, as PubChem may be unavailable +# \dontrun{ +atr <- pai$new("atrazine") +#> Querying BCPC for atrazine ... +#> Querying PubChem for inchikey MXWJVTOOROXGIU-UHFFFAOYSA-N ... +#> Get chemical information from RDKit using PubChem SMILES +#> CCNC1=NC(=NC(=N1)Cl)NC(C)C +print(atr) +#> <pai> with ISO common name $iso atrazine +#> <chent> +#> Identifier $identifier atrazine +#> InChI Key $inchikey MXWJVTOOROXGIU-UHFFFAOYSA-N +#> SMILES string $smiles: +#> PubChem +#> "CCNC1=NC(=NC(=N1)Cl)NC(C)C" +#> Molecular weight $mw: 215.7 +#> PubChem synonyms (up to 10): +#> [1] "atrazine" "1912-24-9" "Gesaprim" "Aatrex" "Atranex" +#> [6] "Atrazin" "Oleogesaprim" "Atazinax" "Atrasine" "Chromozin" +if (!is.null(atr$Picture)) { + plot(atr) +} + +# We can also define pais that are not found on the BCPC site +decanol <- pai$new("1-Decanol") +#> Querying BCPC for 1-Decanol ... +#> Common name 1-Decanol is not known at the BCPC compendium, trying PubChem +#> Querying PubChem for name 1-Decanol ... +#> Get chemical information from RDKit using PubChem SMILES +#> CCCCCCCCCCO +print(decanol) +#> <pai> without ISO common name +#> <chent> +#> Identifier $identifier 1-Decanol +#> InChI Key $inchikey MWKFXSUHUHTGQN-UHFFFAOYSA-N +#> SMILES string $smiles: +#> PubChem +#> "CCCCCCCCCCO" +#> Molecular weight $mw: 158.3 +#> PubChem synonyms (up to 10): +#> [1] "1-DECANOL" "Decyl alcohol" "Decan-1-ol" "112-30-1" +#> [5] "n-Decyl alcohol" "n-Decanol" "Capric alcohol" "Nonylcarbinol" +#> [9] "Antak" "Royaltac" +# } +``` diff --git a/docs/reference/plot.chent-1.png b/docs/reference/plot.chent-1.png Binary files differindex c895eb3..1e8885d 100644 --- a/docs/reference/plot.chent-1.png +++ b/docs/reference/plot.chent-1.png diff --git a/docs/reference/plot.chent.html b/docs/reference/plot.chent.html index 8bbc81c..babdadc 100644 --- a/docs/reference/plot.chent.html +++ b/docs/reference/plot.chent.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Plot method for chent objects — plot.chent • chents</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.4.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.4.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Plot method for chent objects — plot.chent"><meta name="description" content="Plot method for chent objects"><meta property="og:description" content="Plot method for chent objects"></head><body> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Plot method for chent objects — plot.chent • chents</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Plot method for chent objects — plot.chent"><meta name="description" content="Plot method for chent objects"><meta property="og:description" content="Plot method for chent objects"></head><body> <a href="#main" class="visually-hidden-focusable">Skip to contents</a> @@ -7,7 +7,7 @@ <a class="navbar-brand me-2" href="../index.html">chents</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.3.6</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.4.2</small> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> @@ -52,23 +52,24 @@ <dt id="arg--">...<a class="anchor" aria-label="anchor" href="#arg--"></a></dt> -<dd><p>Further arguments passed to <code>grid.picture</code></p></dd> +<dd><p>Further arguments passed to <a href="https://rdrr.io/pkg/grImport/man/grid.picture.html" class="external-link">grImport::grid.picture</a></p></dd> </dl></div> <div class="section level2"> <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> - <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="va">caffeine</span> <span class="op"><-</span> <span class="va"><a href="chent.html">chent</a></span><span class="op">$</span><span class="fu">new</span><span class="op">(</span><span class="st">"caffeine"</span><span class="op">)</span></span></span> -<span class="r-msg co"><span class="r-pr">#></span> PubChem:</span> -<span class="r-msg co"><span class="r-pr">#></span> Trying to get chemical information from RDKit using PubChem_Canonical SMILES</span> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="co"># Don't run examples per default, as PubChem may be unavailable</span></span></span> +<span class="r-in"><span><span class="co"># \dontrun{</span></span></span> +<span class="r-in"><span><span class="va">caffeine</span> <span class="op"><-</span> <span class="va"><a href="chent.html">chent</a></span><span class="op">$</span><span class="fu">new</span><span class="op">(</span><span class="st">"caffeine"</span><span class="op">)</span></span></span> +<span class="r-msg co"><span class="r-pr">#></span> Querying PubChem for name caffeine ...</span> +<span class="r-msg co"><span class="r-pr">#></span> Get chemical information from RDKit using PubChem SMILES</span> <span class="r-msg co"><span class="r-pr">#></span> CN1C=NC2=C1C(=O)N(C(=O)N2C)C</span> -<span class="r-msg co"><span class="r-pr">#></span> Did not find chyaml file ./caffeine.yaml</span> <span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/print.html" class="external-link">print</a></span><span class="op">(</span><span class="va">caffeine</span><span class="op">)</span></span></span> <span class="r-out co"><span class="r-pr">#></span> <chent></span> <span class="r-out co"><span class="r-pr">#></span> Identifier $identifier caffeine </span> <span class="r-out co"><span class="r-pr">#></span> InChI Key $inchikey RYYVLZVUVIJVGH-UHFFFAOYSA-N </span> <span class="r-out co"><span class="r-pr">#></span> SMILES string $smiles:</span> -<span class="r-out co"><span class="r-pr">#></span> PubChem_Canonical </span> +<span class="r-out co"><span class="r-pr">#></span> PubChem </span> <span class="r-out co"><span class="r-pr">#></span> "CN1C=NC2=C1C(=O)N(C(=O)N2C)C" </span> <span class="r-out co"><span class="r-pr">#></span> Molecular weight $mw: 194.2 </span> <span class="r-out co"><span class="r-pr">#></span> PubChem synonyms (up to 10):</span> @@ -76,11 +77,12 @@ <span class="r-out co"><span class="r-pr">#></span> [3] "Guaranine" "1,3,7-Trimethylxanthine"</span> <span class="r-out co"><span class="r-pr">#></span> [5] "Methyltheobromine" "Theine" </span> <span class="r-out co"><span class="r-pr">#></span> [7] "Thein" "Cafeina" </span> -<span class="r-out co"><span class="r-pr">#></span> [9] "Koffein" "Mateina" </span> +<span class="r-out co"><span class="r-pr">#></span> [9] "Caffein" "Cafipel" </span> <span class="r-in"><span><span class="kw">if</span> <span class="op">(</span><span class="op">!</span><span class="fu"><a href="https://rdrr.io/r/base/NULL.html" class="external-link">is.null</a></span><span class="op">(</span><span class="va">caffeine</span><span class="op">$</span><span class="va">Picture</span><span class="op">)</span><span class="op">)</span> <span class="op">{</span></span></span> <span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot</a></span><span class="op">(</span><span class="va">caffeine</span><span class="op">)</span></span></span> <span class="r-in"><span><span class="op">}</span></span></span> <span class="r-plt img"><img src="plot.chent-1.png" alt="" width="700" height="433"></span> +<span class="r-in"><span><span class="co"># }</span></span></span> </code></pre></div> </div> </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> @@ -92,7 +94,7 @@ </div> <div class="pkgdown-footer-right"> - <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.0.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.2.0.</p> </div> </footer></div> diff --git a/docs/reference/plot.chent.md b/docs/reference/plot.chent.md new file mode 100644 index 0000000..eaa6817 --- /dev/null +++ b/docs/reference/plot.chent.md @@ -0,0 +1,51 @@ +# Plot method for chent objects + +Plot method for chent objects + +## Usage + +``` r +# S3 method for class 'chent' +plot(x, ...) +``` + +## Arguments + +- x: + + The chent object to be plotted + +- ...: + + Further arguments passed to + [grImport::grid.picture](https://rdrr.io/pkg/grImport/man/grid.picture.html) + +## Examples + +``` r +# Don't run examples per default, as PubChem may be unavailable +# \dontrun{ +caffeine <- chent$new("caffeine") +#> Querying PubChem for name caffeine ... +#> Get chemical information from RDKit using PubChem SMILES +#> CN1C=NC2=C1C(=O)N(C(=O)N2C)C +print(caffeine) +#> <chent> +#> Identifier $identifier caffeine +#> InChI Key $inchikey RYYVLZVUVIJVGH-UHFFFAOYSA-N +#> SMILES string $smiles: +#> PubChem +#> "CN1C=NC2=C1C(=O)N(C(=O)N2C)C" +#> Molecular weight $mw: 194.2 +#> PubChem synonyms (up to 10): +#> [1] "caffeine" "58-08-2" +#> [3] "Guaranine" "1,3,7-Trimethylxanthine" +#> [5] "Methyltheobromine" "Theine" +#> [7] "Thein" "Cafeina" +#> [9] "Caffein" "Cafipel" +if (!is.null(caffeine$Picture)) { + plot(caffeine) +} + +# } +``` diff --git a/docs/reference/ppp.html b/docs/reference/ppp.html index 725f550..fb10259 100644 --- a/docs/reference/ppp.html +++ b/docs/reference/ppp.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>R6 class for a plant protection product with at least one active ingredient — ppp • chents</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.4.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.4.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="R6 class for a plant protection product with at least one active ingredient — ppp"><meta name="description" content="Contains basic information about the active ingredients in the +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>R6 class for a plant protection product with at least one active ingredient — ppp • chents</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="R6 class for a plant protection product with at least one active ingredient — ppp"><meta name="description" content="Contains basic information about the active ingredients in the product"><meta property="og:description" content="Contains basic information about the active ingredients in the product"></head><body> <a href="#main" class="visually-hidden-focusable">Skip to contents</a> @@ -9,7 +9,7 @@ product"></head><body> <a class="navbar-brand me-2" href="../index.html">chents</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.3.6</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.4.2</small> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> @@ -43,7 +43,7 @@ product</p> <div class="section level2"> <h2 id="format">Format<a class="anchor" aria-label="anchor" href="#format"></a></h2> - <p>An <code>R6Class</code> generator object.</p> + <p>An <a href="https://r6.r-lib.org/reference/R6Class.html" class="external-link">R6::R6Class</a> generator object.</p> </div> <div class="section level2"> <h2 id="public-fields">Public fields<a class="anchor" aria-label="anchor" href="#public-fields"></a></h2> @@ -51,56 +51,26 @@ product</p> <dd><p>The name of the product</p></dd> -<dt><code>ais</code></dt> + <dt><code>ais</code></dt> <dd><p>A list of active ingredients</p></dd> -<dt><code>concentrations</code></dt> + <dt><code>concentrations</code></dt> <dd><p>The concentration of the ais</p></dd> -<dt><code>concentration_units</code></dt> + <dt><code>concentration_units</code></dt> <dd><p>Defaults to g/L</p></dd> -<dt><code>density</code></dt> + <dt><code>density</code></dt> <dd><p>The density of the product</p></dd> -<dt><code>density_units</code></dt> -<dd><p>Defaults to g/L -Creates a new instance of this <a href="https://r6.r-lib.org/reference/R6Class.html" class="external-link">R6</a> class.</p></dd> - - -<dt><code>...</code></dt> -<dd><p>Identifiers of the active ingredients</p></dd> - - -<dt><code>concentrations</code></dt> -<dd><p>Concentrations of the active ingredients</p></dd> - - -<dt><code>concentration_units</code></dt> + <dt><code>density_units</code></dt> <dd><p>Defaults to g/L</p></dd> -<dt><code>density</code></dt> -<dd><p>The density</p></dd> - - -<dt><code>density_units</code></dt> -<dd><p>Defaults to g/L -Printing method</p></dd> - - -</dl><p></p></div> - </div> - <div class="section level2"> - <h2 id="active-bindings">Active bindings<a class="anchor" aria-label="anchor" href="#active-bindings"></a></h2> - <p></p><div class="r6-active-bindings"><dl><dt><code>...</code></dt> -<dd><p>Identifiers of the active ingredients</p></dd> - - </dl><p></p></div> </div> <div class="section level2"> @@ -108,14 +78,11 @@ Printing method</p></dd> <div class="section"> <h3 id="public-methods">Public methods<a class="anchor" aria-label="anchor" href="#public-methods"></a></h3> - -<ul><li><p><a href="#method-ppp-new"><code>ppp$new()</code></a></p></li> -<li><p><a href="#method-ppp-print"><code>ppp$print()</code></a></p></li> +<p></p><ul><li><p><a href="#method-ppp-initialize"><code>ppp$new()</code></a></p></li> <li><p><a href="#method-ppp-clone"><code>ppp$clone()</code></a></p></li> -</ul></div><p></p><hr><a id="method-ppp-new"></a><div class="section"> -<h3 id="method-new-">Method <code>new()</code><a class="anchor" aria-label="anchor" href="#method-new-"></a></h3> - -<div class="section"> +</ul></div><p></p><hr><a id="method-ppp-initialize"></a><div class="section"> +<h3 id="ppp-new-"><code>ppp$new()</code><a class="anchor" aria-label="anchor" href="#ppp-new-"></a></h3> +<p>Creates a new instance of this <a href="https://r6.r-lib.org/reference/R6Class.html" class="external-link">R6</a> class.</p><div class="section"> <h4 id="usage">Usage<a class="anchor" aria-label="anchor" href="#usage"></a></h4> <p></p><div class="r"><div class="sourceCode"><pre><code><span><span class="va"><a href="../reference/ppp.html">ppp</a></span><span class="op">$</span><span class="fu">new</span><span class="op">(</span></span> <span> <span class="va">name</span>,</span> @@ -125,27 +92,39 @@ Printing method</p></dd> <span> density <span class="op">=</span> <span class="fl">1000</span>,</span> <span> density_units <span class="op">=</span> <span class="st">"g/L"</span></span> <span><span class="op">)</span></span></code></pre></div><p></p></div> -</div> +</div><p></p><div class="section"> +<h4 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h4> +<p></p><div class="arguments"><dl><dt><code>name</code></dt> +<dd><p>The name of the product</p></dd> + <dt><code>...</code></dt> +<dd><p>Identifiers of the active ingredients</p></dd> -</div><p></p><hr><a id="method-ppp-print"></a><div class="section"> -<h3 id="method-print-">Method <code><a href="https://rdrr.io/r/base/print.html" class="external-link">print()</a></code><a class="anchor" aria-label="anchor" href="#method-print-"></a></h3> + <dt><code>concentrations</code></dt> +<dd><p>Concentrations of the active ingredients</p></dd> -<div class="section"> -<h4 id="usage-1">Usage<a class="anchor" aria-label="anchor" href="#usage-1"></a></h4> -<p></p><div class="r"><div class="sourceCode"><pre><code><span><span class="va">ppp</span><span class="op">$</span><span class="fu">print</span><span class="op">(</span><span class="op">)</span></span></code></pre></div><p></p></div> + <dt><code>concentration_units</code></dt> +<dd><p>Defaults to g/L</p></dd> + + <dt><code>density</code></dt> +<dd><p>The density</p></dd> + + <dt><code>density_units</code></dt> +<dd><p>Defaults to g/L</p></dd> + + +</dl><p></p></div> </div> +</div> -</div><p></p><hr><a id="method-ppp-clone"></a><div class="section"> -<h3 id="method-clone-">Method <code>clone()</code><a class="anchor" aria-label="anchor" href="#method-clone-"></a></h3> +<p></p><hr><a id="method-ppp-clone"></a><div class="section"> +<h3 id="ppp-clone-"><code>ppp$clone()</code><a class="anchor" aria-label="anchor" href="#ppp-clone-"></a></h3> <p>The objects of this class are cloneable with this method.</p><div class="section"> -<h4 id="usage-2">Usage<a class="anchor" aria-label="anchor" href="#usage-2"></a></h4> +<h4 id="usage-1">Usage<a class="anchor" aria-label="anchor" href="#usage-1"></a></h4> <p></p><div class="r"><div class="sourceCode"><pre><code><span><span class="va">ppp</span><span class="op">$</span><span class="fu">clone</span><span class="op">(</span>deep <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span></span></code></pre></div><p></p></div> -</div> - -<div class="section"> -<h4 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h4> +</div><p></p><div class="section"> +<h4 id="arguments-1">Arguments<a class="anchor" aria-label="anchor" href="#arguments-1"></a></h4> <p></p><div class="arguments"><dl><dt><code>deep</code></dt> <dd><p>Whether to make a deep clone.</p></dd> @@ -155,6 +134,7 @@ Printing method</p></dd> </div> + </div> </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> @@ -166,7 +146,7 @@ Printing method</p></dd> </div> <div class="pkgdown-footer-right"> - <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.0.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.2.0.</p> </div> </footer></div> diff --git a/docs/reference/ppp.md b/docs/reference/ppp.md new file mode 100644 index 0000000..12293c5 --- /dev/null +++ b/docs/reference/ppp.md @@ -0,0 +1,102 @@ +# R6 class for a plant protection product with at least one active ingredient + +Contains basic information about the active ingredients in the product + +## Format + +An [R6::R6Class](https://r6.r-lib.org/reference/R6Class.html) generator +object. + +## Public fields + +- `name`: + + The name of the product + +- `ais`: + + A list of active ingredients + +- `concentrations`: + + The concentration of the ais + +- `concentration_units`: + + Defaults to g/L + +- `density`: + + The density of the product + +- `density_units`: + + Defaults to g/L + +## Methods + +### Public methods + +- [`ppp$new()`](#method-ppp-initialize) + +- [`ppp$clone()`](#method-ppp-clone) + +------------------------------------------------------------------------ + +### `ppp$new()` + +Creates a new instance of this +[R6](https://r6.r-lib.org/reference/R6Class.html) class. + +#### Usage + + ppp$new( + name, + ..., + concentrations, + concentration_units = "g/L", + density = 1000, + density_units = "g/L" + ) + +#### Arguments + +- `name`: + + The name of the product + +- `...`: + + Identifiers of the active ingredients + +- `concentrations`: + + Concentrations of the active ingredients + +- `concentration_units`: + + Defaults to g/L + +- `density`: + + The density + +- `density_units`: + + Defaults to g/L + +------------------------------------------------------------------------ + +### `ppp$clone()` + +The objects of this class are cloneable with this method. + +#### Usage + + ppp$clone(deep = FALSE) + +#### Arguments + +- `deep`: + + Whether to make a deep clone. diff --git a/docs/reference/print.chent.html b/docs/reference/print.chent.html index 8747604..1d7e75a 100644 --- a/docs/reference/print.chent.html +++ b/docs/reference/print.chent.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Printing method for chent objects — print.chent • chents</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.4.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.4.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Printing method for chent objects — print.chent"><meta name="description" content="Printing method for chent objects"><meta property="og:description" content="Printing method for chent objects"></head><body> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Printing method for chent objects — print.chent • chents</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Printing method for chent objects — print.chent"><meta name="description" content="Printing method for chent objects"><meta property="og:description" content="Printing method for chent objects"></head><body> <a href="#main" class="visually-hidden-focusable">Skip to contents</a> @@ -7,7 +7,7 @@ <a class="navbar-brand me-2" href="../index.html">chents</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.3.6</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.4.2</small> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> @@ -65,7 +65,7 @@ </div> <div class="pkgdown-footer-right"> - <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.0.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.2.0.</p> </div> </footer></div> diff --git a/docs/reference/print.chent.md b/docs/reference/print.chent.md new file mode 100644 index 0000000..f4d84bf --- /dev/null +++ b/docs/reference/print.chent.md @@ -0,0 +1,20 @@ +# Printing method for chent objects + +Printing method for chent objects + +## Usage + +``` r +# S3 method for class 'chent' +print(x, ...) +``` + +## Arguments + +- x: + + The chent object to be printed + +- ...: + + Further arguments for compatibility with the S3 method diff --git a/docs/reference/print.pai.html b/docs/reference/print.pai.html index 78a2a0b..29c88df 100644 --- a/docs/reference/print.pai.html +++ b/docs/reference/print.pai.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Printing method for pai objects (pesticidal active ingredients) — print.pai • chents</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.4.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.4.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Printing method for pai objects (pesticidal active ingredients) — print.pai"><meta name="description" content="Printing method for pai objects (pesticidal active ingredients)"><meta property="og:description" content="Printing method for pai objects (pesticidal active ingredients)"></head><body> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Printing method for pai objects (pesticidal active ingredients) — print.pai • chents</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Printing method for pai objects (pesticidal active ingredients) — print.pai"><meta name="description" content="Printing method for pai objects (pesticidal active ingredients)"><meta property="og:description" content="Printing method for pai objects (pesticidal active ingredients)"></head><body> <a href="#main" class="visually-hidden-focusable">Skip to contents</a> @@ -7,7 +7,7 @@ <a class="navbar-brand me-2" href="../index.html">chents</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.3.6</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.4.2</small> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> @@ -65,7 +65,7 @@ </div> <div class="pkgdown-footer-right"> - <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.0.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.2.0.</p> </div> </footer></div> diff --git a/docs/reference/print.pai.md b/docs/reference/print.pai.md new file mode 100644 index 0000000..86cad4b --- /dev/null +++ b/docs/reference/print.pai.md @@ -0,0 +1,20 @@ +# Printing method for pai objects (pesticidal active ingredients) + +Printing method for pai objects (pesticidal active ingredients) + +## Usage + +``` r +# S3 method for class 'pai' +print(x, ...) +``` + +## Arguments + +- x: + + The chent object to be printed + +- ...: + + Further arguments for compatibility with the S3 method diff --git a/docs/reference/print.ppp.html b/docs/reference/print.ppp.html new file mode 100644 index 0000000..6635097 --- /dev/null +++ b/docs/reference/print.ppp.html @@ -0,0 +1,78 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Printing method for ppp objects (plant protection products) — print.ppp • chents</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Printing method for ppp objects (plant protection products) — print.ppp"><meta name="description" content="Printing method for ppp objects (plant protection products)"><meta property="og:description" content="Printing method for ppp objects (plant protection products)"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="light" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">chents</a> + + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.4.2</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">Changelog</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/chents/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>Printing method for ppp objects (plant protection products)</h1> + <small class="dont-index">Source: <a href="https://github.com/jranke/chents/blob/HEAD/R/chent.R" class="external-link"><code>R/chent.R</code></a></small> + <div class="d-none name"><code>print.ppp.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>Printing method for ppp objects (plant protection products)</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="co"># S3 method for class 'ppp'</span></span> +<span><span class="fu"><a href="https://rdrr.io/r/base/print.html" class="external-link">print</a></span><span class="op">(</span><span class="va">x</span>, <span class="va">...</span><span class="op">)</span></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> + + +<dl><dt id="arg-x">x<a class="anchor" aria-label="anchor" href="#arg-x"></a></dt> +<dd><p>The chent object to be printed</p></dd> + + +<dt id="arg--">...<a class="anchor" aria-label="anchor" href="#arg--"></a></dt> +<dd><p>Further arguments for compatibility with the S3 method</p></dd> + +</dl></div> + + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.2.0.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/reference/print.ppp.md b/docs/reference/print.ppp.md new file mode 100644 index 0000000..8387a54 --- /dev/null +++ b/docs/reference/print.ppp.md @@ -0,0 +1,20 @@ +# Printing method for ppp objects (plant protection products) + +Printing method for ppp objects (plant protection products) + +## Usage + +``` r +# S3 method for class 'ppp' +print(x, ...) +``` + +## Arguments + +- x: + + The chent object to be printed + +- ...: + + Further arguments for compatibility with the S3 method |
