diff options
author | Johannes Ranke <jranke@uni-bremen.de> | 2020-11-19 15:41:24 +0100 |
---|---|---|
committer | Johannes Ranke <jranke@uni-bremen.de> | 2020-11-19 15:41:24 +0100 |
commit | db9ae6a0c9cecb92048fde6f06af1da183c09b5f (patch) | |
tree | f0ea97545549c71bd7aa3d13afed422fd402f0e6 /docs/dev/reference/plot.mkinfit.html | |
parent | 6441a9f35d66f2c4d38c0036f99cd8f509d76f3b (diff) |
Depend on parallel, doc improvements
By depending on parallel instead of importing it, functions to set up
and stop a cluster are always available when mkin is loaded.
The use of multicore processing in mmkin on Windows is now documented in
the help file, which brings mkin closer to a version 1.0 #9.
Diffstat (limited to 'docs/dev/reference/plot.mkinfit.html')
-rw-r--r-- | docs/dev/reference/plot.mkinfit.html | 123 |
1 files changed, 68 insertions, 55 deletions
diff --git a/docs/dev/reference/plot.mkinfit.html b/docs/dev/reference/plot.mkinfit.html index ffbd1206..3a05a02d 100644 --- a/docs/dev/reference/plot.mkinfit.html +++ b/docs/dev/reference/plot.mkinfit.html @@ -74,7 +74,7 @@ observed data together with the solution of the fitted model." /> </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">mkin</a> - <span class="version label label-info" data-toggle="tooltip" data-placement="bottom" title="In-development version">0.9.50.3</span> + <span class="version label label-info" data-toggle="tooltip" data-placement="bottom" title="In-development version">0.9.50.4</span> </span> </div> @@ -122,7 +122,7 @@ observed data together with the solution of the fitted model." /> </ul> <ul class="nav navbar-nav navbar-right"> <li> - <a href="http://github.com/jranke/mkin/"> + <a href="https://github.com/jranke/mkin/"> <span class="fab fa fab fa-github fa-lg"></span> </a> @@ -141,7 +141,7 @@ observed data together with the solution of the fitted model." /> <div class="col-md-9 contents"> <div class="page-header"> <h1>Plot the observed data and the fitted model of an mkinfit object</h1> - <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/plot.mkinfit.R'><code>R/plot.mkinfit.R</code></a></small> + <small class="dont-index">Source: <a href='https://github.com/jranke/mkin/blob/master/R/plot.mkinfit.R'><code>R/plot.mkinfit.R</code></a></small> <div class="hidden name"><code>plot.mkinfit.Rd</code></div> </div> @@ -152,49 +152,49 @@ observed data together with the solution of the fitted model.</p> </div> <pre class="usage"><span class='co'># S3 method for mkinfit</span> -<span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>( - <span class='no'>x</span>, - <span class='kw'>fit</span> <span class='kw'>=</span> <span class='no'>x</span>, - <span class='kw'>obs_vars</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/names.html'>names</a></span>(<span class='no'>fit</span>$<span class='no'>mkinmod</span>$<span class='no'>map</span>), - <span class='kw'>xlab</span> <span class='kw'>=</span> <span class='st'>"Time"</span>, - <span class='kw'>ylab</span> <span class='kw'>=</span> <span class='st'>"Observed"</span>, - <span class='kw'>xlim</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/range.html'>range</a></span>(<span class='no'>fit</span>$<span class='no'>data</span>$<span class='no'>time</span>), - <span class='kw'>ylim</span> <span class='kw'>=</span> <span class='st'>"default"</span>, - <span class='kw'>col_obs</span> <span class='kw'>=</span> <span class='fl'>1</span>:<span class='fu'><a href='https://rdrr.io/r/base/length.html'>length</a></span>(<span class='no'>obs_vars</span>), - <span class='kw'>pch_obs</span> <span class='kw'>=</span> <span class='no'>col_obs</span>, - <span class='kw'>lty_obs</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/rep.html'>rep</a></span>(<span class='fl'>1</span>, <span class='fu'><a href='https://rdrr.io/r/base/length.html'>length</a></span>(<span class='no'>obs_vars</span>)), - <span class='kw'>add</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, - <span class='kw'>legend</span> <span class='kw'>=</span> !<span class='no'>add</span>, - <span class='kw'>show_residuals</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, - <span class='kw'>show_errplot</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, - <span class='kw'>maxabs</span> <span class='kw'>=</span> <span class='st'>"auto"</span>, - <span class='kw'>sep_obs</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, - <span class='kw'>rel.height.middle</span> <span class='kw'>=</span> <span class='fl'>0.9</span>, - <span class='kw'>row_layout</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, - <span class='kw'>lpos</span> <span class='kw'>=</span> <span class='st'>"topright"</span>, - <span class='kw'>inset</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='fl'>0.05</span>, <span class='fl'>0.05</span>), - <span class='kw'>show_errmin</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, - <span class='kw'>errmin_digits</span> <span class='kw'>=</span> <span class='fl'>3</span>, - <span class='kw'>frame</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, - <span class='no'>...</span> -) - -<span class='fu'>plot_sep</span>( - <span class='no'>fit</span>, - <span class='kw'>show_errmin</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, - <span class='kw'>show_residuals</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/ifelse.html'>ifelse</a></span>(<span class='fu'><a href='https://rdrr.io/r/base/identical.html'>identical</a></span>(<span class='no'>fit</span>$<span class='no'>err_mod</span>, <span class='st'>"const"</span>), <span class='fl'>TRUE</span>, <span class='st'>"standardized"</span>), - <span class='no'>...</span> -) - -<span class='fu'>plot_res</span>( - <span class='no'>fit</span>, - <span class='kw'>sep_obs</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, - <span class='kw'>show_errmin</span> <span class='kw'>=</span> <span class='no'>sep_obs</span>, - <span class='kw'>standardized</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/ifelse.html'>ifelse</a></span>(<span class='fu'><a href='https://rdrr.io/r/base/identical.html'>identical</a></span>(<span class='no'>fit</span>$<span class='no'>err_mod</span>, <span class='st'>"const"</span>), <span class='fl'>FALSE</span>, <span class='fl'>TRUE</span>), - <span class='no'>...</span> -) - -<span class='fu'>plot_err</span>(<span class='no'>fit</span>, <span class='kw'>sep_obs</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, <span class='kw'>show_errmin</span> <span class='kw'>=</span> <span class='no'>sep_obs</span>, <span class='no'>...</span>)</pre> +<span class='fu'><a href='https://rdrr.io/r/graphics/plot.default.html'>plot</a></span><span class='op'>(</span> + <span class='va'>x</span>, + fit <span class='op'>=</span> <span class='va'>x</span>, + obs_vars <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/names.html'>names</a></span><span class='op'>(</span><span class='va'>fit</span><span class='op'>$</span><span class='va'>mkinmod</span><span class='op'>$</span><span class='va'>map</span><span class='op'>)</span>, + xlab <span class='op'>=</span> <span class='st'>"Time"</span>, + ylab <span class='op'>=</span> <span class='st'>"Observed"</span>, + xlim <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/range.html'>range</a></span><span class='op'>(</span><span class='va'>fit</span><span class='op'>$</span><span class='va'>data</span><span class='op'>$</span><span class='va'>time</span><span class='op'>)</span>, + ylim <span class='op'>=</span> <span class='st'>"default"</span>, + col_obs <span class='op'>=</span> <span class='fl'>1</span><span class='op'>:</span><span class='fu'><a href='https://rdrr.io/r/base/length.html'>length</a></span><span class='op'>(</span><span class='va'>obs_vars</span><span class='op'>)</span>, + pch_obs <span class='op'>=</span> <span class='va'>col_obs</span>, + lty_obs <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/rep.html'>rep</a></span><span class='op'>(</span><span class='fl'>1</span>, <span class='fu'><a href='https://rdrr.io/r/base/length.html'>length</a></span><span class='op'>(</span><span class='va'>obs_vars</span><span class='op'>)</span><span class='op'>)</span>, + add <span class='op'>=</span> <span class='cn'>FALSE</span>, + legend <span class='op'>=</span> <span class='op'>!</span><span class='va'>add</span>, + show_residuals <span class='op'>=</span> <span class='cn'>FALSE</span>, + show_errplot <span class='op'>=</span> <span class='cn'>FALSE</span>, + maxabs <span class='op'>=</span> <span class='st'>"auto"</span>, + sep_obs <span class='op'>=</span> <span class='cn'>FALSE</span>, + rel.height.middle <span class='op'>=</span> <span class='fl'>0.9</span>, + row_layout <span class='op'>=</span> <span class='cn'>FALSE</span>, + lpos <span class='op'>=</span> <span class='st'>"topright"</span>, + inset <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span><span class='fl'>0.05</span>, <span class='fl'>0.05</span><span class='op'>)</span>, + show_errmin <span class='op'>=</span> <span class='cn'>FALSE</span>, + errmin_digits <span class='op'>=</span> <span class='fl'>3</span>, + frame <span class='op'>=</span> <span class='cn'>TRUE</span>, + <span class='va'>...</span> +<span class='op'>)</span> + +<span class='fu'>plot_sep</span><span class='op'>(</span> + <span class='va'>fit</span>, + show_errmin <span class='op'>=</span> <span class='cn'>TRUE</span>, + show_residuals <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/ifelse.html'>ifelse</a></span><span class='op'>(</span><span class='fu'><a href='https://rdrr.io/r/base/identical.html'>identical</a></span><span class='op'>(</span><span class='va'>fit</span><span class='op'>$</span><span class='va'>err_mod</span>, <span class='st'>"const"</span><span class='op'>)</span>, <span class='cn'>TRUE</span>, <span class='st'>"standardized"</span><span class='op'>)</span>, + <span class='va'>...</span> +<span class='op'>)</span> + +<span class='fu'>plot_res</span><span class='op'>(</span> + <span class='va'>fit</span>, + sep_obs <span class='op'>=</span> <span class='cn'>FALSE</span>, + show_errmin <span class='op'>=</span> <span class='va'>sep_obs</span>, + standardized <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/ifelse.html'>ifelse</a></span><span class='op'>(</span><span class='fu'><a href='https://rdrr.io/r/base/identical.html'>identical</a></span><span class='op'>(</span><span class='va'>fit</span><span class='op'>$</span><span class='va'>err_mod</span>, <span class='st'>"const"</span><span class='op'>)</span>, <span class='cn'>FALSE</span>, <span class='cn'>TRUE</span><span class='op'>)</span>, + <span class='va'>...</span> +<span class='op'>)</span> + +<span class='fu'>plot_err</span><span class='op'>(</span><span class='va'>fit</span>, sep_obs <span class='op'>=</span> <span class='cn'>FALSE</span>, show_errmin <span class='op'>=</span> <span class='va'>sep_obs</span>, <span class='va'>...</span><span class='op'>)</span></pre> <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> <table class="ref-arguments"> @@ -314,7 +314,7 @@ chi2 error percentage.</p></td> </tr> <tr> <th>...</th> - <td><p>Further arguments passed to <code><a href='https://rdrr.io/r/base/plot.html'>plot</a></code>.</p></td> + <td><p>Further arguments passed to <code><a href='https://rdrr.io/r/graphics/plot.default.html'>plot</a></code>.</p></td> </tr> <tr> <th>standardized</th> @@ -331,22 +331,35 @@ standardized in the residual plot?</p></td> <p>If the current plot device is a <code><a href='https://rdrr.io/pkg/tikzDevice/man/tikz.html'>tikz</a></code> device, then latex is being used for the formatting of the chi2 error level, if <code>show_errmin = TRUE</code>.</p> + <h2 class="hasAnchor" id="author"><a class="anchor" href="#author"></a>Author</h2> + + <p>Johannes Ranke</p> <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> <pre class="examples"><div class='input'> <span class='co'># One parent compound, one metabolite, both single first order, path from</span> <span class='co'># parent to sink included</span> <span class='co'># \dontrun{</span> -<span class='no'>SFO_SFO</span> <span class='kw'><-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>, <span class='st'>"m1"</span>, <span class='kw'>full</span> <span class='kw'>=</span> <span class='st'>"Parent"</span>), - <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>, <span class='kw'>full</span> <span class='kw'>=</span> <span class='st'>"Metabolite M1"</span> ))</div><div class='output co'>#> <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'><span class='no'>fit</span> <span class='kw'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>SFO_SFO</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#> <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='output co'>#> <span class='warning'>Warning: Shapiro-Wilk test for standardized residuals: p = 0.0165</span></div><div class='input'><span class='no'>fit</span> <span class='kw'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>SFO_SFO</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>error_model</span> <span class='kw'>=</span> <span class='st'>"tc"</span>)</div><div class='output co'>#> <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='input'><span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='no'>fit</span>)</div><div class='img'><img src='plot.mkinfit-1.png' alt='' width='700' height='433' /></div><div class='input'><span class='fu'>plot_res</span>(<span class='no'>fit</span>)</div><div class='img'><img src='plot.mkinfit-2.png' alt='' width='700' height='433' /></div><div class='input'><span class='fu'>plot_res</span>(<span class='no'>fit</span>, <span class='kw'>standardized</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)</div><div class='img'><img src='plot.mkinfit-3.png' alt='' width='700' height='433' /></div><div class='input'><span class='fu'>plot_err</span>(<span class='no'>fit</span>)</div><div class='img'><img src='plot.mkinfit-4.png' alt='' width='700' height='433' /></div><div class='input'> +<span class='va'>SFO_SFO</span> <span class='op'><-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span><span class='op'>(</span>parent <span class='op'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span><span class='op'>(</span><span class='st'>"SFO"</span>, <span class='st'>"m1"</span>, full <span class='op'>=</span> <span class='st'>"Parent"</span><span class='op'>)</span>, + m1 <span class='op'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span><span class='op'>(</span><span class='st'>"SFO"</span>, full <span class='op'>=</span> <span class='st'>"Metabolite M1"</span> <span class='op'>)</span><span class='op'>)</span> +</div><div class='output co'>#> <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'><span class='va'>fit</span> <span class='op'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span><span class='op'>(</span><span class='va'>SFO_SFO</span>, <span class='va'>FOCUS_2006_D</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span> +</div><div class='output co'>#> <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='input'><span class='va'>fit</span> <span class='op'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span><span class='op'>(</span><span class='va'>SFO_SFO</span>, <span class='va'>FOCUS_2006_D</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span>, error_model <span class='op'>=</span> <span class='st'>"tc"</span><span class='op'>)</span> +</div><div class='output co'>#> <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='input'><span class='fu'><a href='https://rdrr.io/r/graphics/plot.default.html'>plot</a></span><span class='op'>(</span><span class='va'>fit</span><span class='op'>)</span> +</div><div class='img'><img src='plot.mkinfit-1.png' alt='' width='700' height='433' /></div><div class='input'><span class='fu'>plot_res</span><span class='op'>(</span><span class='va'>fit</span><span class='op'>)</span> +</div><div class='img'><img src='plot.mkinfit-2.png' alt='' width='700' height='433' /></div><div class='input'><span class='fu'>plot_res</span><span class='op'>(</span><span class='va'>fit</span>, standardized <span class='op'>=</span> <span class='cn'>FALSE</span><span class='op'>)</span> +</div><div class='img'><img src='plot.mkinfit-3.png' alt='' width='700' height='433' /></div><div class='input'><span class='fu'>plot_err</span><span class='op'>(</span><span class='va'>fit</span><span class='op'>)</span> +</div><div class='img'><img src='plot.mkinfit-4.png' alt='' width='700' height='433' /></div><div class='input'> <span class='co'># Show the observed variables separately, with residuals</span> -<span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='no'>fit</span>, <span class='kw'>sep_obs</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>show_residuals</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>lpos</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"topright"</span>, <span class='st'>"bottomright"</span>), - <span class='kw'>show_errmin</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='img'><img src='plot.mkinfit-5.png' alt='' width='700' height='433' /></div><div class='input'> +<span class='fu'><a href='https://rdrr.io/r/graphics/plot.default.html'>plot</a></span><span class='op'>(</span><span class='va'>fit</span>, sep_obs <span class='op'>=</span> <span class='cn'>TRUE</span>, show_residuals <span class='op'>=</span> <span class='cn'>TRUE</span>, lpos <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span><span class='st'>"topright"</span>, <span class='st'>"bottomright"</span><span class='op'>)</span>, + show_errmin <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span> +</div><div class='img'><img src='plot.mkinfit-5.png' alt='' width='700' height='433' /></div><div class='input'> <span class='co'># The same can be obtained with less typing, using the convenience function plot_sep</span> -<span class='fu'>plot_sep</span>(<span class='no'>fit</span>, <span class='kw'>lpos</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"topright"</span>, <span class='st'>"bottomright"</span>))</div><div class='img'><img src='plot.mkinfit-6.png' alt='' width='700' height='433' /></div><div class='input'> +<span class='fu'>plot_sep</span><span class='op'>(</span><span class='va'>fit</span>, lpos <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span><span class='st'>"topright"</span>, <span class='st'>"bottomright"</span><span class='op'>)</span><span class='op'>)</span> +</div><div class='img'><img src='plot.mkinfit-6.png' alt='' width='700' height='433' /></div><div class='input'> <span class='co'># Show the observed variables separately, with the error model</span> -<span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='no'>fit</span>, <span class='kw'>sep_obs</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>show_errplot</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>lpos</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"topright"</span>, <span class='st'>"bottomright"</span>), - <span class='kw'>show_errmin</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='img'><img src='plot.mkinfit-7.png' alt='' width='700' height='433' /></div><div class='input'># } +<span class='fu'><a href='https://rdrr.io/r/graphics/plot.default.html'>plot</a></span><span class='op'>(</span><span class='va'>fit</span>, sep_obs <span class='op'>=</span> <span class='cn'>TRUE</span>, show_errplot <span class='op'>=</span> <span class='cn'>TRUE</span>, lpos <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span><span class='st'>"topright"</span>, <span class='st'>"bottomright"</span><span class='op'>)</span>, + show_errmin <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span> +</div><div class='img'><img src='plot.mkinfit-7.png' alt='' width='700' height='433' /></div><div class='input'><span class='co'># }</span> </div></pre> </div> @@ -364,7 +377,7 @@ latex is being used for the formatting of the chi2 error level, if </div> <div class="pkgdown"> - <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> </div> </footer> |