1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
|
<!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.0">
<title>Graphical User Interface for Fitting Kinetic Models to Chemical Degradation Data • gmkin</title>
<!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous">
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="bootstrap-toc.css">
<script src="bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous">
<!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="pkgdown.css" rel="stylesheet">
<script src="pkgdown.js"></script><meta property="og:title" content="Graphical User Interface for Fitting Kinetic Models to Chemical Degradation Data">
<meta property="og:description" content="Browser based graphical user interface for R package mkin, based
on the gWidgetsWWW2 package. Both gmkin and gWidgetsWWW2 are developed on
GitHub, but are also available from the R-Forge repository.">
<!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body data-spy="scroll" data-target="#toc">
<div class="container template-home">
<header><div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<span class="navbar-brand">
<a class="navbar-link" href="index.html">gmkin</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.6.12</span>
</span>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="index.html">
<span class="fas fa-home fa-lg"></span>
</a>
</li>
<li>
<a href="reference/index.html">Reference</a>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
Articles
<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li>
<a href="articles/gmkin_manual.html">Manual for gmkin</a>
</li>
</ul>
</li>
<li>
<a href="news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="http://github.com/jranke/gmkin/">
<span class="fab fa-github fa-lg"></span>
</a>
</li>
</ul>
</div>
<!--/.nav-collapse -->
</div>
<!--/.container -->
</div>
<!--/.navbar -->
</header><div class="row">
<div class="contents col-md-9">
<div id="gmkin" class="section level1">
<div class="page-header"><h1 class="hasAnchor">
<a href="#gmkin" class="anchor"></a>gmkin</h1></div>
<p>The R package <a href="https://pkgdown.jrwb.de/gmkin">gmkin</a> provides a browser based graphical user interface (GUI) for fitting kinetic models to chemical degradation data based on R package <a href="https://pkgdown.jrwb.de/mkin">mkin</a>. The GUI is based on the <a href="http://github.com/jverzani/gWidgetsWWW2">gWidgetsWWW2</a> package developed by John Verzani. The GUI elements are created by the JavaScript library ExtJS which is bundled with gWidgetsWWW2.</p>
<div id="system-requirements" class="section level2">
<h2 class="hasAnchor">
<a href="#system-requirements" class="anchor"></a>System requirements</h2>
<p>For running gmkin you need a system running a recent version of R (version 3.1.0 or later), the gWidgesWWW2 package, the gmkin package and a web browser (Firefox/Iceweasel and Chrome work for me) with JavaScript enabled.</p>
<p>It should be possible to run gmkin on most laptop or desktop computers running Linux, Mac OS X, Windows 7 or Windows 10.</p>
<p>To view the complete set of widgets in the browser window without resizing anything, it needs a screen space of 1366x740 pixels.</p>
<div id="installing-r" class="section level3">
<h3 class="hasAnchor">
<a href="#installing-r" class="anchor"></a>Installing R</h3>
<p>Please refer to <a href="http://cran.r-project.org">CRAN</a> for installation instructions and binary packages. If you are on Windows, please consult the <a href="http://cran.r-project.org/bin/windows/base/rw-FAQ.html">FAQ for Windows</a>, especially the entries “<a href="http://cran.r-project.org/bin/windows/base/rw-FAQ.html#How-do-I-install-R-for-Windows_003f">How do I install R for Windows?</a>”, “<a href="http://cran.r-project.org/bin/windows/base/rw-FAQ.html#How-do-I-run-it_003f">How do I run it?</a>”.</p>
<p>If you would like to upgrade your R installation, please refer to the respective <a href="http://cran.r-project.org/bin/windows/base/rw-FAQ.html#What_0027s-the-best-way-to-upgrade_003f">FAQ entry</a>.</p>
</div>
<div id="installing-gmkin-and-gwidgetswww2" class="section level3">
<h3 class="hasAnchor">
<a href="#installing-gmkin-and-gwidgetswww2" class="anchor"></a>Installing gmkin and gWidgetsWWW2</h3>
<p>Windows and Linux users running R 3.1.0 or later can make use of my drat package repository on github. Before installing gmkin, you should update your R packages already installed, e.g. by starting R, and pasting the command</p>
<div class="sourceCode" id="cb1"><pre class="sourceCode s"><code class="sourceCode gnuassembler"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true"></a>update.packages()</span></code></pre></div>
<p>or similar, depending on your R installation.</p>
<p>For installing gmkin or upgrading to the latest released version, please install the drat package</p>
<div class="sourceCode" id="cb2"><pre class="sourceCode s"><code class="sourceCode gnuassembler"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true"></a>install.packages(<span class="st">"drat"</span>)</span></code></pre></div>
<p>add my repository</p>
<div class="sourceCode" id="cb3"><pre class="sourceCode s"><code class="sourceCode gnuassembler"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true"></a><span class="kw">drat::</span>addRepo(<span class="st">"jranke"</span>)</span></code></pre></div>
<p>and install as usual</p>
<div class="sourceCode" id="cb4"><pre class="sourceCode s"><code class="sourceCode gnuassembler"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true"></a>install.packages(<span class="st">"gmkin"</span>)</span></code></pre></div>
<p>The latest changes to gmkin are recorded in the <a href="https://github.com/jranke/gmkin/blob/master/NEWS.md">NEWS</a> file, more details can be found in the <a href="https://github.com/jranke/gmkin/commits/master">commit history</a>.</p>
<p><img src="gmkin_screenshot.png" alt="gmkin screenshot"></p>
</div>
</div>
<div id="usage" class="section level2">
<h2 class="hasAnchor">
<a href="#usage" class="anchor"></a>Usage</h2>
<p>Without further preparation, you can start the GUI by starting R and pasting the following commands into the R terminal (R console on Windows):</p>
<div class="sourceCode" id="cb5"><pre class="sourceCode s"><code class="sourceCode gnuassembler"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true"></a>require(gmkin)</span>
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true"></a>gmkin()</span></code></pre></div>
<p>You may also want to adapt the browser that R starts (using e.g. <code><a href="https://rdrr.io/r/base/options.html">options(browser="/usr/bin/firefox")</a></code> on linux, or setting the default browser on Windows).</p>
</div>
<div id="documentation" class="section level2">
<h2 class="hasAnchor">
<a href="#documentation" class="anchor"></a>Documentation</h2>
<p>For a complete overview of the functionality of the gmkin graphical user interface please refer to the <a href="https://pkgdown.jrwb.de/gmkin/articles/gmkin_manual.html">manual</a> available at the gmkin <a href="https://pkgdown.jrwb.de/gmkin">documentation website</a>.</p>
<p>In case you would like to see the documentation of the underlying mkin package, please refer to its <a href="https://pkgdown.jrwb.de/mkin">documentation website</a>.</p>
</div>
<div id="status-and-known-issues" class="section level2">
<h2 class="hasAnchor">
<a href="#status-and-known-issues" class="anchor"></a>Status and known issues</h2>
<ul>
<li>gmkin was developed in the hope that it will be useful. However, no warranty can be given that it will meet your expectations. There may be bugs, so please be careful, check your results for plausibility and use your own expertise to judge yourself.</li>
<li>Starting the GUI takes some time. If the GUI does not come up after 10-15 seconds, close your browser and start gmkin again using the command ‘gmkin()’. Once the GUI is started, it is reasonably responsive.</li>
<li>Please check the <a href="https://github.com/jranke/gmkin/issues">issues</a> reported on github</li>
<li>The R console starting the graphical user interface is not secured against manipulations from local users on multiuser systems (see <a href="https://github.com/jverzani/gWidgetsWWW2/issues/22">gWidgetsWWW2 issue</a>).</li>
</ul>
<div id="notes-on-the-gwidgetswww2-package" class="section level3">
<h3 class="hasAnchor">
<a href="#notes-on-the-gwidgetswww2-package" class="anchor"></a>Notes on the gWidgetsWWW2 package</h3>
<p>The R package gWidgetsWWW2 is not available on CRAN because it contains path names with more then 100 characters in the JavaScript files which limits its portability. Also, it attaches some R objects to the search path, which is, in its current form, not fully in line with the CRAN package policy. It is not a widely used library for creating graphical user interfaces and is not supported by a commercial company. However it makes it possible to create a reasonably complex user interface by just writing R code, and is therefore used by gmkin.</p>
</div>
<div id="installation-using-the-devtools-package" class="section level3">
<h3 class="hasAnchor">
<a href="#installation-using-the-devtools-package" class="anchor"></a>Installation using the devtools package</h3>
<p>Users of the <code>devtools</code> package can also install gWidgetsWWW2 and gmkin directly from the respective github repositories:</p>
<div class="sourceCode" id="cb6"><pre class="sourceCode s"><code class="sourceCode gnuassembler"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true"></a>require(devtools)</span>
<span id="cb6-2"><a href="#cb6-2" aria-hidden="true"></a>install_github(<span class="st">"jverzani/gWidgetsWWW2"</span>, quick = TRUE)</span>
<span id="cb6-3"><a href="#cb6-3" aria-hidden="true"></a>install_github(<span class="st">"jranke/gmkin"</span>, quick = TRUE)</span></code></pre></div>
<p>Installing gWidgetsWWW2 in this way yields a lot of warnings concerning overly long path names (see Notes on gWidgetsWWW2 above). Using <code>quick = TRUE</code> skips docs, multiple-architecture builds, demos, and vignettes, to make installation as fast and painless as possible.</p>
</div>
</div>
<div id="simplifying-the-start-of-gmkin-under-windows" class="section level2">
<h2 class="hasAnchor">
<a href="#simplifying-the-start-of-gmkin-under-windows" class="anchor"></a>Simplifying the start of gmkin under Windows</h2>
<p>You can put the commands</p>
<div class="sourceCode" id="cb7"><pre class="sourceCode s"><code class="sourceCode gnuassembler"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true"></a>require(gmkin)</span>
<span id="cb7-2"><a href="#cb7-2" aria-hidden="true"></a>gmkin()</span>
<span id="cb7-3"><a href="#cb7-3" aria-hidden="true"></a>while (TRUE) {</span>
<span id="cb7-4"><a href="#cb7-4" aria-hidden="true"></a> Sys.sleep(<span class="dv">10</span>)</span>
<span id="cb7-5"><a href="#cb7-5" aria-hidden="true"></a>}</span></code></pre></div>
<p>into an R script (e.g. under <code>C:\Users\<your username>\AppData\Roaming\gmkin_start.R</code>), and create a Windows shortcut, e.g. on the Desktop, with the target <code>"C:\Program Files\R\R-4.x.y\bin\R.exe" --slave -f c:\Users\<your username>\AppData\Roaming\gmkin_start.R</code>, where R-4.x.y is the version of R that you would like to use with gmkin. This will start a non-interactive R console that runs the gmkin GUI. In the properties dialogue of the shortcut, you can also set the working directory in which it starts gmkin. Thanks to Jonas Klein of the Umweltbundesamt for the trick with using Sys.sleep in a while loop and for suggesting the AppData directory for the start script.</p>
<p>Caveat: The last time I tested this (13 February 2021), starting gmkin with such a shortcut slowed down loading the GUI elements significantly. This was under Windows 10 64 bit. Therefore, for Windows I would currently recommend to start the R GUI application and start gmkin from there as described under ‘Usage’.</p>
</div>
<div id="acknowledgements" class="section level2">
<h2 class="hasAnchor">
<a href="#acknowledgements" class="anchor"></a>Acknowledgements</h2>
<p>Financial support, feedback and suggestions by the German Federal Environmental Agency (<a href="http://www.umweltbundesamt.de">Umweltbundesamt</a>) in two projects in 2014 and 2015 was crucial for reaching version 0.6.3 in November 2015 and is gratefully acknowledged. In particular, Stefan Meinecke contributed with a lot of user feedback and suggestions for improvement in that time.</p>
<p>The adaptation to mkin versions > 0.9.49.6 that can do fits using a two-component error model was supported by another project by the Umweltbundesamt in 2018/2019.</p>
</div>
</div>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
<div class="links">
<h2>Links</h2>
<ul class="list-unstyled">
<li>Browse source code at <br><a href="http://github.com/jranke/gmkin/">http://github.com/jranke/gmkin/</a>
</li>
<li>Report a bug at <br><a href="http://github.com/jranke/gmkin/issues">http://github.com/jranke/gmkin/issues</a>
</li>
</ul>
</div>
<div class="license">
<h2>License</h2>
<ul class="list-unstyled">
<li>GPL</li>
</ul>
</div>
<div class="developers">
<h2>Developers</h2>
<ul class="list-unstyled">
<li>Johannes Ranke <br><small class="roles"> Author, maintainer, copyright holder </small> </li>
<li><a href="authors.html">All authors...</a></li>
</ul>
</div>
</div>
</div>
<footer><div class="copyright">
<p>Developed by Johannes Ranke.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p>
</div>
</footer>
</div>
</body>
</html>
|