From 71468046acbaf005173ababa0fe5ffb9c6426278 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Mon, 6 Mar 2017 15:39:58 +0100 Subject: Static documentation built by pkgdown Not by staticdocs any more --- docs/articles/gmkin_manual.css | 16 ++ docs/articles/gmkin_manual.html | 391 +++++++++++++++++++++++++++++++++ docs/articles/img/arrangement.png | Bin 0 -> 136370 bytes docs/articles/img/confidence.png | Bin 0 -> 8900 bytes docs/articles/img/configuration.png | Bin 0 -> 100479 bytes docs/articles/img/dataset_Z.png | Bin 0 -> 77074 bytes docs/articles/img/generatedatagrid.png | Bin 0 -> 78599 bytes docs/articles/img/gmkin_start.png | Bin 0 -> 97244 bytes docs/articles/img/import.png | Bin 0 -> 50967 bytes docs/articles/img/long.png | Bin 0 -> 7607 bytes docs/articles/img/modeleditor.png | Bin 0 -> 31335 bytes docs/articles/img/new_project.png | Bin 0 -> 20841 bytes docs/articles/img/plotoptions.png | Bin 0 -> 15186 bytes docs/articles/img/projects_min.png | Bin 0 -> 12208 bytes docs/articles/img/results.png | Bin 0 -> 83261 bytes docs/articles/img/successfulupload.png | Bin 0 -> 94126 bytes docs/articles/img/summary.png | Bin 0 -> 24806 bytes docs/articles/img/upload_dialogue.png | Bin 0 -> 18848 bytes docs/articles/img/uploadarea.png | Bin 0 -> 28306 bytes docs/articles/index.html | 107 +++++++++ docs/authors.html | 116 ++++++++++ docs/index.html | 186 ++++++++++++++++ docs/jquery.sticky-kit.min.js | 9 + docs/link.svg | 12 + docs/news/index.html | 111 ++++++++++ docs/pkgdown.css | 113 ++++++++++ docs/pkgdown.js | 8 + docs/reference/FOCUS_2006.html | 142 ++++++++++++ docs/reference/FOCUS_2006_Z.html | 139 ++++++++++++ docs/reference/UBA_model_gallery.html | 140 ++++++++++++ docs/reference/gmkin.html | 158 +++++++++++++ docs/reference/gmkinws.html | 131 +++++++++++ docs/reference/index.html | 142 ++++++++++++ 33 files changed, 1921 insertions(+) create mode 100644 docs/articles/gmkin_manual.css create mode 100644 docs/articles/gmkin_manual.html create mode 100644 docs/articles/img/arrangement.png create mode 100644 docs/articles/img/confidence.png create mode 100644 docs/articles/img/configuration.png create mode 100644 docs/articles/img/dataset_Z.png create mode 100644 docs/articles/img/generatedatagrid.png create mode 100644 docs/articles/img/gmkin_start.png create mode 100644 docs/articles/img/import.png create mode 100644 docs/articles/img/long.png create mode 100644 docs/articles/img/modeleditor.png create mode 100644 docs/articles/img/new_project.png create mode 100644 docs/articles/img/plotoptions.png create mode 100644 docs/articles/img/projects_min.png create mode 100644 docs/articles/img/results.png create mode 100644 docs/articles/img/successfulupload.png create mode 100644 docs/articles/img/summary.png create mode 100644 docs/articles/img/upload_dialogue.png create mode 100644 docs/articles/img/uploadarea.png create mode 100644 docs/articles/index.html create mode 100644 docs/authors.html create mode 100644 docs/index.html create mode 100644 docs/jquery.sticky-kit.min.js create mode 100644 docs/link.svg create mode 100644 docs/news/index.html create mode 100644 docs/pkgdown.css create mode 100644 docs/pkgdown.js create mode 100644 docs/reference/FOCUS_2006.html create mode 100644 docs/reference/FOCUS_2006_Z.html create mode 100644 docs/reference/UBA_model_gallery.html create mode 100644 docs/reference/gmkin.html create mode 100644 docs/reference/gmkinws.html create mode 100644 docs/reference/index.html (limited to 'docs') diff --git a/docs/articles/gmkin_manual.css b/docs/articles/gmkin_manual.css new file mode 100644 index 0000000..3bd91ab --- /dev/null +++ b/docs/articles/gmkin_manual.css @@ -0,0 +1,16 @@ +/* Thanks to Steve Powell for http://rpubs.com/stevepowell99/floating-css */ +#TOC { + position: fixed; + left: 0; + top: 0; + width: 200px; + height: 100%; + overflow:auto; +} + +body { + max-width: 800px; + margin: auto; + margin-left:210px; + line-height: 20px; +} diff --git a/docs/articles/gmkin_manual.html b/docs/articles/gmkin_manual.html new file mode 100644 index 0000000..2c0652c --- /dev/null +++ b/docs/articles/gmkin_manual.html @@ -0,0 +1,391 @@ + + + + + + + +Manual for gmkin • gmkin + + + + + + +
+
+ + + +
+
+ + + + +
+
+

+ Introduction

+

The R add-on package gmkin provides a browser based graphical interface for performing kinetic evaluations of degradation data using the mkin package. While the use of gmkin should be largely self-explanatory, this manual may serve as a functionality overview and reference.

+

For system requirements and installation instructions, please refer to the gmkin homepage.

+
+
+

+ Starting gmkin

+

As gmkin is an R package, you need to start R and load the gmkin package before you can run gmkin. The latter can be achieved by entering the command

+
library(gmkin)
+

into the R console. This will also load the packages that gmkin depends on, most notably gWidgetsWWW2 and mkin. Loading the package only has to be done once after you have started R.

+

Before you start gmkin, you should make sure that R is using the working directory that you would like to keep your gmkin project file(s) in. If you use the standard R GUI application on windows, you can change the working directory from the File menu (‘File’ -> ‘Change dir…’).

+

Once you are sure that the working directory is what you want it to be, gmkin can be started by entering the R command

+ +

This will cause the default browser to start up or, if it is already running, to pop up and open a new tab for displaying the gmkin user interface.

+

In the R console, you should see a message that the httpd help server is started, if it wasn’t already started before.

+

In the browser, you should see something like the screenshot below.

+
+Screenshot of the newly started gmkin GUI

Screenshot of the newly started gmkin GUI

+
+

The statusbar at the bottom of the gmkin window shows, among others, the working directory that gmkin uses.

+

If the browser only shows “Loading ExtJS…” and nothing else happens for about 10 to 15 seconds, please enter the gmkin() command again in the R console. If this still does not bring up the gmkin GUI, please close the browser and try again.

+
+
+

+ Three column layout

+

Since version 0.6.1, gmkin adheres to a three column layout. To the left, there are explorer areas for the available projects, datasets, kinetic models and the completed fits.

+

In the central, tabbed area, the projects, datasets, models and fits are defined. The area to the right is mainly for showing information intended to support the user, and results. However, it also contains a tab ‘Data’ for editing kinetic data.

+
+
+

+ Project file management

+

At startup, the project explorer to the left shows the two project workspaces ‘FOCUS_2006’ and ‘FOCUS_2006_Z’ delivered with the package. The project manangement area in the center gives the possibility to save these projects under a new name, or to start a new, empty project.

+

A gmkin project workspace contains datasets, kinetic models for fitting, and so-called fits, i.e. the results of fitting models to data. The project area also shows the current working directory, where project workspace files are saved using the file extension .gmkinws.

+

Once a project has been saved by the user, the project explorer to the left will show it in the project list.

+
+Screenshot of saving a new project

Screenshot of saving a new project

+
+

The current state of a project should repeatedly be saved during the work in order to avoid loosing data. This can be achieved by selecting the ‘Project’ tab in the center and pressing the ‘Save project to project file’ button. More conveniently, the keyboard shortcut Shift-F12 (was Ctrl-X in gmkin < 0.6.6) can be used to save the current status of the project.

+

In the project file management area, datasets and models can be imported from one of the projects in the project list, once it has been selected in the droplist labelled ‘Import from:’.

+
+Screenshot of importing datasets and models

Screenshot of importing datasets and models

+
+

Once the project has been set up, you may want to minimize the project explorer, especially if you are limited in vertical screen space.

+
+Screenshot of minimized project explorer

Screenshot of minimized project explorer

+
+
+
+

+ Dataset editor

+

When you select one of the datasets in the dataset explorer to the left, some summary information about the dataset is shown in the center, and the data itself is loaded into the data editor to the right.

+
+Screenshot of the GUI after loading a dataset

Screenshot of the GUI after loading a dataset

+
+

When you have added information about the units, or edited the data to the right, you should hit the button ‘Keep changes’. This will add a new entry in the dataset explorer.

+

In the dataset editor to the right, you can override original data (for example in order to follow FOCUS recommendations for time zero samples or values below the limit of detection) by entering numbers in the override column.

+

When saving a dataset, the sampling times, the number of replicates and the list of observed variables will be computed from the current data in the data editor.

+

However, entering data in these fields is a prerequisite for entering a new dataset directly in the dataset editor.

+
+

+ Entering data directly

+

For entering new data manually, there are two possibilities. You can either change the Dataset title of the current dataset and edit the data in the Data editor to the right. Or, if the new data should have a different structure, e.g. different sampling times, observed variables and replicates, click on “New dataset”, edit the dataset title, sampling times, number of replicates and the list of observed variables, and press the button ‘Generate grid for entering kinetic data’, in order to prepare the Data editor to the right.

+

For sampling times and short names of the relevant compounds, a comma separated list must be entered, with a space after each comma. An example of filling out the respective fields is shown below.

+
+Screenshot of generating a data grid

Screenshot of generating a data grid

+
+

After that, the actual measurements can be entered into the Data editor to the right, in the column ‘value’.

+

If everything is OK, press “Keep changes” to save the dataset in the current workspace. Note that you need to save the project file (see above) in order to be able to use the dataset that you created in a future gmkin session.

+
+
+

+ Importing data from text files

+

In case you want to work with a larger dataset that is already available as a computer file e.g. in a spreadsheet application, you can export these data as a tab separated or comma separated text file and import it using the “Browse” and “Upload” buttons in the dataset editor.

+

As an example, we can create a text file from one of the datasets shipped with the mkin package using the following R command:

+
write.table(schaefer07_complex_case, sep = ",", dec = ".", 
+            row.names = FALSE, quote = FALSE, 
+            file = "schaefer07.csv")
+

This produces a text file with comma separated values in the current working directory of R.

+

Loading this text file into gmkin using the “Browse” and “Upload” buttons

+
+Screenshot of the browse and upload dialogue

Screenshot of the browse and upload dialogue

+
+

results in an an import configuration area showing the top lines of the imported file, and giving the possibility to chose the import options matching the file format.

+
+Screenshot of the import configuration area

Screenshot of the import configuration area

+
+

In the import configuration area, the following options can be specified. In the field “Comment lines”, the number of lines in the beginning of the file that should be ignored can be specified.

+

The checkbox on the next line should be checked if the first line of the file contains the column names, i.e. the names of the observed variables when the data are in wide format.

+

As “Separator”, whitespace, semicolon or comma can be chosen. If whitespace is selected, files in which the values are separated by a fixed or varying number of whitespace characters should be read in correctly. As the tabulator counts as a whitespace character, this is also the option to choose for tabulator separated values.

+

As the “Decimal” separator, comma “,” or period “.” can be selected.

+

In the next line, it can be specified if the data are in wide or in long format. If in wide format, the only option left to specify is the title of the column containing the sampling times. If the data is in long format, the column headings specifying the columns containing the observed variables (default is “name”), the sampling times (default is “time”), the observed values (default is “value”) and, if present in the data, the relative errors (default is “err”) can be adapted. The default settings appearing if the long format is selected are shown below.

+
+Screenshot of the default variable names for data in long format

Screenshot of the default variable names for data in long format

+
+

In our example we have data in the wide format, and after adapting the “Separator” to a comma, we can press the button “Import using options specified below”, and the data should be imported. If successful, the dataset editor should show the sampling times and the names of the observed variables, and the Data editor should show the imported data in a grid for further editing or specifying overrides.

+
+Screenshot of a successful upload

Screenshot of a successful upload

+
+

After adapting the dataset title and possibly the units, press “Keep changes” to save the dataset in the current workspace. Again, you need to save the project file in order to be able to use the dataset that you created in a future gmkin session.

+
+
+
+

+ Model editor

+

The following screenshot shows the model editor for the model ‘Z.2a.ff’ from the project workspace ‘FOCUS_2006_Z’ provided with the gmkin package.

+
+Screenshot of the model editor

Screenshot of the model editor

+
+

In the first line the name of the model can be edited. You can also specify “min” or “max” for minimum or maximum use of formation fractions. Maximum use of formation fractions means that the differential equations in the degradation model are formulated using formation fractions. When you specify “min”, then formation fractions are only used for the parent compound when you use the FOMC, DFOP or the HS model for it.

+

Pressing “Add observed variable” adds a line in the array of state variable specifications below. The observed variables to be added are usually transformation products (usually termed metabolites), but can also be the parent compound in a different compartment (e.g. “parent_sediment”).

+

Only observed variable names that occur in previously defined datasets or models can be selected. For any observed variable other than the first one, only the SFO or the SFORB model can be selected. For each observed variables, a comma separated list of target variables can be specified. In addition, a pathway to the sink compartment can be selected. If too many observed variables have been added, complete lines can be removed from the model definition by pressing the button “Remove observed variable”.

+

If the model definition is supposedly correct, press “Keep changes” to make it possible to select it for fitting in the listing of models to the left.

+
+
+

+ Configuring the fit

+

If a dataset and a kinetic model are selected, the button “Configure fit” below in the Explorer window “Configuration” becomes active. Pressing it opens the “Configuration” area in the center and loads the dataset into the Data editor to the right, for viewing only.

+

After pressing the button ‘Plot unoptimised’, the data and the kinetic model with default starting parameters are plotted in the ‘Plot’ area to the right.

+
+Screenshot of the fit configuration area

Screenshot of the fit configuration area

+
+
+

+ Fit options

+

The most important fit options of the mkinfit function can be set via the controls in the fit configuration area shown above. If the “plot” checkbox is checked (and on Windows, the R GUI is used for running gmkin), an R graphics device started via the R console shows the fitting progress, i.e. the change of the model solution together with the data during the optimisation.

+

The “solution_type” can either be “auto”, which means that the most effective solution method is chosen for the model, in the order of “analytical” (for parent only degradation data), “eigen” (for differential equation models with only linear terms, i.e. without FOMC, DFOP or HS submodels) or “deSolve”, which can handle all model definitions generated by the mkin package. If a compiler (gcc, on Windows install the ‘Rtools’ software package), then the “deSolve” solution method is alway chosen when there are more than one variables in the model.

+

The parameters “atol” and “rtol” are only effective if the solution type is “deSolve”. They control the precision of the iterative numerical solution of the differential equation model.

+

The checkboxes “transform_rates” and “transform_fractions” control if the parameters are fitted as defined in the model, or if they are internally transformed during the fitting process in order to improve the estimation of standard errors and confidence intervals which are based on a linear approximation at the optimum found by the fitting algorithm.

+

If fitting with transformed fractions leads to a suboptimal fit, doing a first run without transforming fractions may help. A final run using the optimised parameters from the previous run as starting values (see comment on “Get initials from” above) can then be performed with transformed fractions.

+

The dropdown box “weight” specifies if and how the observed values should be weighted in the fitting process. If “manual” is chosen, the values in the “err” column of the dataset are used, which are set to unity by default. Setting these to higher values gives lower weight and vice versa. If “none” is chosen, observed values are not weighted. Please refer to the documentation of the modFit function from the FME package for the meaning of options “std” and “mean”.

+

If the “IRLS” option is set to “obs”, then we make use of iteratively reweighted least squares fitting. Please refer to the mkinfit documentation for more details. IRLS fitting can be configured using the options “reweight.tol” and “reweight.max.iter”.

+

The drop down box “method.modFit” makes it possible to choose between the optimisation algorithms “Port” (the default in mkin versions > 0.9-33, a local optimisation algorithm using a model/trust region approach), “Marq” (the former default in mkin, a Levenberg-Marquardt variant from the R package minpack.lm), and “SANN” (the simulated annealing method - robust but inefficient and without a convergence criterion).

+

Finally, the maximum number of iterations for the optimisation can be adapted using the “maxit.modFit” field.

+
+
+

+ Plot options

+

In the right part of the fit configuration area, the file format can be chosen, the legend can be turned off, and the observed variables for which the data and the model fit should be plotted can be selected as shown below.

+
+plot options

plot options

+
+

On systems running the Windows operating system, the windows metafile (wmf) format can be additionally chosen. Changing the file format for plotting will also change the extension of the proposed filename for saving the plot.

+
+
+

+ Parameters

+

Below the fit control area, a table with the Starting parameter list is displayed. While name and type of the parameters should not be edited, their initial values can be edited by clicking on a row. Also, it can be specified if the parameters should be fixed in the optimisation process.

+

If the initial values for the parameters were changed, the resulting model solution can be visually checked by pressing the button “Plot unoptimised”. This will update the plot of the model and the data using the specified initial parameter values.

+

If a similar model with a partially overlapping model definition has already be fitted, initial values for parameters with the same name in both models can also be retrieved from previous fits by selecting the fit and pressing the button “Get starting parameters from”. This facilitates stepwise fitting of more complex degradation pathways.

+

After the model has been successfully fitted by pressing the “Run fit” button, the optimised parameter values are added to the parameter table.

+
+
+

+ Fitting the model

+

In many cases the starting parameters and the fit options do not need to be modified and the model fitting process can simply be started by pressing the “Run fit” button. In the R console, the progressive reduction in the model cost can be monitored and will be displayed in the following way:

+
Model cost at call  1 :  15156.12 
+Model cost at call  3 :  15156.12 
+Model cost at call  7 :  14220.79 
+Model cost at call  8 :  14220.79 
+Model cost at call  11 :  14220.79 
+Model cost at call  12 :  3349.268 
+Model cost at call  15 :  3349.268 
+Model cost at call  17 :  788.6367 
+Model cost at call  18 :  788.6366 
+Model cost at call  22 :  374.0575 
+Model cost at call  23 :  374.0575 
+Model cost at call  27 :  371.2135 
+Model cost at call  28 :  371.2135 
+Model cost at call  32 :  371.2134 
+Model cost at call  36 :  371.2134 
+Model cost at call  37 :  371.2134 
+Optimisation by method Port successfully terminated.
+

If plotting of the fitting progress was selected, a new separate graphics window should either pop up, or a graphics window previously started for this purpose will be reused.

+

If your screen size allows for it, you can arrange the R plotting window and the R console in a way that you can see everything at the same time:

+
+Screenshot of arrangement of plot window and console

Screenshot of arrangement of plot window and console

+
+
+
+
+

+ Results and summary

+

Once a fit has successfully been completed, the most important results are shown in several tables in the “Result” area as shown below.

+
+Screenshot of the results

Screenshot of the results

+
+

The detailed summary can be accessed below these tables.

+
+Screenshot of the summary

Screenshot of the summary

+
+

The complete summary can be saved into a text file by specifying a suitable file name and pressing the button “Save summary”.

+
+

+ Confidence interval plots

+

Whenever a new fit has been configured or a run of a fit has been completed, the plotting area is updated with the abovementioned plot of the data and the current model solution.

+

In addition, a confidence interval plot is shown below this conventional plot. In case a fit has been run and confidence intervals were successfully calculated for the fit (i.e. if the model was not overparameterised and no other problems occurred), the confidence intervals are graphically displayed as bars as shown below.

+
+confidence

confidence

+
+
+
+
+

+ Howtos

+

The following sections show step by step descriptions of how to perform certain tasks using gmkin. In principle, this should be necessary as the GUI was designed to be largely self-explanatory. Nevertheless may help a beginner to understand how to use gmkin. At the same time, the gmkin author uses them as test cases to make sure that the most important functionality is not broken before releasing a new version.

+
+

+ 1. Use a model and a dataset from a built-in workspace

+
    +
  • Start gmkin
  • +
  • In the project explorer, select the project ‘FOCUS_2006’
  • +
  • In the dataset explorer, select ‘FOCUS example dataset C’
  • +
  • In the model explorer, select ‘SFO’
  • +
  • In the configuration display, press ‘Configure fit’
  • +
  • In the configuration editor in the center, press ‘Run fit’
  • +
  • In the pop-up window that appears, press ‘Yes’
  • +
  • In the result viewer in the center, press ‘Keep fit’
  • +
  • Switch to the Project editor in the center
  • +
  • In the project explorer, enter the project name ‘Howto test 1’
  • +
  • Press ‘Save project to project file’
  • +
+
+ +
+

+ 3. Load a tab separated input file in wide format and evaluate using a newly created model

+
    +
  • Start gmkin
  • +
  • In the project explorer, enter the project name ‘Howto test 3’
  • +
  • Press ‘Save project to project file’
  • +
  • Select the dataset editor in the center
  • +
  • In the data upload widget, press ‘Browse’
  • +
  • Select the file ‘testdata/d_synth_DFOP_lin_c.txt’ from gmkin installation
  • +
  • Press ‘Upload’
  • +
  • Press ‘Import using options specified below’
  • +
  • Enter dataset title ‘DFOP lin c’
  • +
  • Press ‘Keep changes’
  • +
  • Select the model editor in the center
  • +
  • Press ‘New model’
  • +
  • Enter ‘DFOP lin’ as the model name
  • +
  • Select ‘max’ in the dropbox ‘Use of formation fractions’
  • +
  • Press ‘Add observed variable’ three times
  • +
  • In the line where ‘parent’ is selected, in the dropbox after the word ‘to’, select ‘M1’
  • +
  • Click outside the dropbox
  • +
  • In the line where ‘M1’ is selected, in the dropbox after the word ‘to’, select ‘M2’
  • +
  • Click outside the dropbox
  • +
  • Press ‘Keep changes’
  • +
  • In the dataset explorer, select ‘DFOP lin c’
  • +
  • In the model explorer, select ‘DFOP lin’
  • +
  • In the configuration display, press ‘Configure fit’
  • +
  • In the configuration editor in the center, press ‘Run fit’
  • +
  • In the pop-up window that appears, press ‘Yes’
  • +
  • In the result viewer in the center, press ‘Keep fit’
  • +
  • Switch to the Project editor in the center
  • +
  • Press ‘Save project to project file’
  • +
+ +
+
+
+
+ + + +
+ + +
+ +
+

Site built with pkgdown.

+
+ +
+
+ + + diff --git a/docs/articles/img/arrangement.png b/docs/articles/img/arrangement.png new file mode 100644 index 0000000..7227a22 Binary files /dev/null and b/docs/articles/img/arrangement.png differ diff --git a/docs/articles/img/confidence.png b/docs/articles/img/confidence.png new file mode 100644 index 0000000..4cf929b Binary files /dev/null and b/docs/articles/img/confidence.png differ diff --git a/docs/articles/img/configuration.png b/docs/articles/img/configuration.png new file mode 100644 index 0000000..1a18608 Binary files /dev/null and b/docs/articles/img/configuration.png differ diff --git a/docs/articles/img/dataset_Z.png b/docs/articles/img/dataset_Z.png new file mode 100644 index 0000000..c76cbe8 Binary files /dev/null and b/docs/articles/img/dataset_Z.png differ diff --git a/docs/articles/img/generatedatagrid.png b/docs/articles/img/generatedatagrid.png new file mode 100644 index 0000000..bc70099 Binary files /dev/null and b/docs/articles/img/generatedatagrid.png differ diff --git a/docs/articles/img/gmkin_start.png b/docs/articles/img/gmkin_start.png new file mode 100644 index 0000000..9b494ec Binary files /dev/null and b/docs/articles/img/gmkin_start.png differ diff --git a/docs/articles/img/import.png b/docs/articles/img/import.png new file mode 100644 index 0000000..94e56dd Binary files /dev/null and b/docs/articles/img/import.png differ diff --git a/docs/articles/img/long.png b/docs/articles/img/long.png new file mode 100644 index 0000000..fc317d1 Binary files /dev/null and b/docs/articles/img/long.png differ diff --git a/docs/articles/img/modeleditor.png b/docs/articles/img/modeleditor.png new file mode 100644 index 0000000..a06d733 Binary files /dev/null and b/docs/articles/img/modeleditor.png differ diff --git a/docs/articles/img/new_project.png b/docs/articles/img/new_project.png new file mode 100644 index 0000000..d25b97e Binary files /dev/null and b/docs/articles/img/new_project.png differ diff --git a/docs/articles/img/plotoptions.png b/docs/articles/img/plotoptions.png new file mode 100644 index 0000000..24cda2d Binary files /dev/null and b/docs/articles/img/plotoptions.png differ diff --git a/docs/articles/img/projects_min.png b/docs/articles/img/projects_min.png new file mode 100644 index 0000000..a739c03 Binary files /dev/null and b/docs/articles/img/projects_min.png differ diff --git a/docs/articles/img/results.png b/docs/articles/img/results.png new file mode 100644 index 0000000..a13ff8e Binary files /dev/null and b/docs/articles/img/results.png differ diff --git a/docs/articles/img/successfulupload.png b/docs/articles/img/successfulupload.png new file mode 100644 index 0000000..d6ebe89 Binary files /dev/null and b/docs/articles/img/successfulupload.png differ diff --git a/docs/articles/img/summary.png b/docs/articles/img/summary.png new file mode 100644 index 0000000..a1cc72f Binary files /dev/null and b/docs/articles/img/summary.png differ diff --git a/docs/articles/img/upload_dialogue.png b/docs/articles/img/upload_dialogue.png new file mode 100644 index 0000000..c9ec223 Binary files /dev/null and b/docs/articles/img/upload_dialogue.png differ diff --git a/docs/articles/img/uploadarea.png b/docs/articles/img/uploadarea.png new file mode 100644 index 0000000..60f71aa Binary files /dev/null and b/docs/articles/img/uploadarea.png differ diff --git a/docs/articles/index.html b/docs/articles/index.html new file mode 100644 index 0000000..217aee8 --- /dev/null +++ b/docs/articles/index.html @@ -0,0 +1,107 @@ + + + + + + + + +Articles • gmkin + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + +
+ + + +
+
+
+

All vignettes

+

+ + +
+
+
+ +
+ + +
+

Site built with pkgdown.

+
+ +
+
+ + + diff --git a/docs/authors.html b/docs/authors.html new file mode 100644 index 0000000..da6d7aa --- /dev/null +++ b/docs/authors.html @@ -0,0 +1,116 @@ + + + + + + + + +Authors • gmkin + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+
+ + +
    +
  • +

    Johannes Ranke. Author, maintainer, copyright holder. +

    +
  • +
  • +

    Stefan Meinecke. Contributor. +

    +
  • +
  • +

    Eurofins Regulatory AG. Copyright holder. +

    +
  • +
+ +
+ +
+ + +
+ + +
+

Site built with pkgdown.

+
+ +
+
+ + + diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 0000000..e79ada8 --- /dev/null +++ b/docs/index.html @@ -0,0 +1,186 @@ + + + + + + + +Graphical User Interface for Fitting Kinetic Models to Chemical Degradation Data • gmkin + + + + + + +
+
+ + + +
+
+
+ + +

gmkin screenshot

+
+

+ System requirements

+

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.

+

It should be possible to run gmkin on most laptop or desktop computers running Linux, Mac OS X, Windows XP or Windows 7. It is frequently checked under Linux and Windows 7.

+

To view the complete set of widgets in the browser window without resizing anything, it needs a screen space of 1366x740 pixels.

+
+

+ Installing R

+

Please refer to CRAN for installation instructions and binary packages. If you are on Windows, please consult the FAQ for Windows, especially the entries “How do I install R for Windows?”, “How do I run it?”.

+

If you would like to upgrade your R installation, please refer to the respective FAQ entry.

+
+
+

+ Installing gmkin and gWidgetsWWW2

+

Windows and Linux users running R 3.1.0 or later can make use of the package repository on R-Forge. Before installing gmkin, you should update your R packages already installed, e.g. by starting R, and pasting the command

+
update.packages()
+

or similar, depending on your R installation.

+

For installing gmkin or upgrading to the latest released version, please use the command

+
install.packages("gmkin", repos = c("http://r-forge.r-project.org", getOption("repos")))
+

If you have not set your CRAN mirror yet, you may have to select one from the list that appears.

+

The above command temporarily adds the R-Forge repository to your package sources. It should pull the gmkin package and its dependencies, notably the gWidgetsWWW2 package which is not available from the CRAN archive (see below). Mac users that have the necessary development files installed can probably install from the source files in this repository (not tested).

+

In a previous version of this README I have described how to permanently add the R-Forge repository to your options. However, I noticed this has unwanted side effects, so I do not recommend it any longer. Therefore, you may want to revert such changes to your R startup options.

+

The latest changes to gmkin are recorded in the NEWS file, more details can be found in the commit history.

+
+
+
+

+ Usage

+

Without further preparation, you can start the GUI by starting R and pasting the following commands into the R terminal (R console on Windows):

+
require(gmkin)
+gmkin()
+

You may also want to adapt the browser that R starts (using e.g. options(browser="/usr/bin/firefox") on linux, or setting the default browser on Windows).

+
+
+

+ Documentation

+

For a complete overview of the functionality of the gmkin graphical user interface please refer to the manual available at the gmkin documentation website.

+

In case you would like to see the documentation of the underlying mkin package, please refer to its documentation website.

+
+
+

+ Status and known issues

+
    +
  • 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.
  • +
  • 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.
  • +
  • Please check the issues reported on github
  • +
  • The R console starting the graphical user interface is not secured against manipulations from local users on multiuser systems (see gWidgetsWWW2 issue).
  • +
+
+

+ Notes on the gWidgetsWWW2 package

+

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.

+
+
+

+ Installation using the devtools package

+

Users of the devtools package can also install gWidgetsWWW2 and gmkin directly from the respective github repositories:

+
require(devtools)
+install_github("jverzani/gWidgetsWWW2", quick = TRUE)
+install_github("jranke/gmkin", quick = TRUE)
+

Installing gWidgetsWWW2 in this way yields a lot of warnings concerning overly long path names (see Notes on gWidgetsWWW2 above). Using quick = TRUE skips docs, multiple-architecture builds, demos, and vignettes, to make installation as fast and painless as possible.

+
+
+
+

+ Simplifying the start of gmkin under Windows

+

You can put the commands

+
require(gmkin)
+gmkin()
+while (TRUE) {
+  Sys.sleep(10)
+}
+

into an R script (e.g. under C:\Users\<your username>\AppData\Roaming\gmkin_start.R), and create a Windows shortcut, e.g. on the Desktop, with the target "C:\Program Files\R\R-3.x.y\bin\R.exe" --slave -f c:\Users\<your username>\AppData\Roaming\gmkin_start.R, where R.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.

+
+
+

+ Acknowledgements

+

Financial support, feedback and suggestions by the German Federal Environmental Agency (Umweltbundesamt) 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.

+
+
+
+ + +
+ + +
+ +
+

Site built with pkgdown.

+
+ +
+
+ + + diff --git a/docs/jquery.sticky-kit.min.js b/docs/jquery.sticky-kit.min.js new file mode 100644 index 0000000..e2a3c6d --- /dev/null +++ b/docs/jquery.sticky-kit.min.js @@ -0,0 +1,9 @@ +/* + Sticky-kit v1.1.2 | WTFPL | Leaf Corcoran 2015 | http://leafo.net +*/ +(function(){var b,f;b=this.jQuery||window.jQuery;f=b(window);b.fn.stick_in_parent=function(d){var A,w,J,n,B,K,p,q,k,E,t;null==d&&(d={});t=d.sticky_class;B=d.inner_scrolling;E=d.recalc_every;k=d.parent;q=d.offset_top;p=d.spacer;w=d.bottoming;null==q&&(q=0);null==k&&(k=void 0);null==B&&(B=!0);null==t&&(t="is_stuck");A=b(document);null==w&&(w=!0);J=function(a,d,n,C,F,u,r,G){var v,H,m,D,I,c,g,x,y,z,h,l;if(!a.data("sticky_kit")){a.data("sticky_kit",!0);I=A.height();g=a.parent();null!=k&&(g=g.closest(k)); +if(!g.length)throw"failed to find stick parent";v=m=!1;(h=null!=p?p&&a.closest(p):b("
"))&&h.css("position",a.css("position"));x=function(){var c,f,e;if(!G&&(I=A.height(),c=parseInt(g.css("border-top-width"),10),f=parseInt(g.css("padding-top"),10),d=parseInt(g.css("padding-bottom"),10),n=g.offset().top+c+f,C=g.height(),m&&(v=m=!1,null==p&&(a.insertAfter(h),h.detach()),a.css({position:"",top:"",width:"",bottom:""}).removeClass(t),e=!0),F=a.offset().top-(parseInt(a.css("margin-top"),10)||0)-q, +u=a.outerHeight(!0),r=a.css("float"),h&&h.css({width:a.outerWidth(!0),height:u,display:a.css("display"),"vertical-align":a.css("vertical-align"),"float":r}),e))return l()};x();if(u!==C)return D=void 0,c=q,z=E,l=function(){var b,l,e,k;if(!G&&(e=!1,null!=z&&(--z,0>=z&&(z=E,x(),e=!0)),e||A.height()===I||x(),e=f.scrollTop(),null!=D&&(l=e-D),D=e,m?(w&&(k=e+u+c>C+n,v&&!k&&(v=!1,a.css({position:"fixed",bottom:"",top:c}).trigger("sticky_kit:unbottom"))),eb&&!v&&(c-=l,c=Math.max(b-u,c),c=Math.min(q,c),m&&a.css({top:c+"px"})))):e>F&&(m=!0,b={position:"fixed",top:c},b.width="border-box"===a.css("box-sizing")?a.outerWidth()+"px":a.width()+"px",a.css(b).addClass(t),null==p&&(a.after(h),"left"!==r&&"right"!==r||h.append(a)),a.trigger("sticky_kit:stick")),m&&w&&(null==k&&(k=e+u+c>C+n),!v&&k)))return v=!0,"static"===g.css("position")&&g.css({position:"relative"}), +a.css({position:"absolute",bottom:d,top:"auto"}).trigger("sticky_kit:bottom")},y=function(){x();return l()},H=function(){G=!0;f.off("touchmove",l);f.off("scroll",l);f.off("resize",y);b(document.body).off("sticky_kit:recalc",y);a.off("sticky_kit:detach",H);a.removeData("sticky_kit");a.css({position:"",bottom:"",top:"",width:""});g.position("position","");if(m)return null==p&&("left"!==r&&"right"!==r||a.insertAfter(h),h.remove()),a.removeClass(t)},f.on("touchmove",l),f.on("scroll",l),f.on("resize", +y),b(document.body).on("sticky_kit:recalc",y),a.on("sticky_kit:detach",H),setTimeout(l,0)}};n=0;for(K=this.length;n + + + + + diff --git a/docs/news/index.html b/docs/news/index.html new file mode 100644 index 0000000..32a55e5 --- /dev/null +++ b/docs/news/index.html @@ -0,0 +1,111 @@ + + + + + + + + +All news • gmkin + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+ +
+ + +
+
+
+ + + +
+ +
+ + +
+

Site built with pkgdown.

+
+ +
+
+ + + diff --git a/docs/pkgdown.css b/docs/pkgdown.css new file mode 100644 index 0000000..fd7b0ba --- /dev/null +++ b/docs/pkgdown.css @@ -0,0 +1,113 @@ +/* Sticker footer */ +body > .container { + display: flex; + padding-top: 60px; + min-height: calc(100vh); + flex-direction: column; +} + +body > .container .row { + flex: 1; +} + +footer { + margin-top: 45px; + padding: 35px 0 36px; + border-top: 1px solid #e5e5e5; + color: #666; + display: flex; +} +footer p { + margin-bottom: 0; +} +footer div { + flex: 1; +} +footer .pkgdown { + text-align: right; +} +footer p { + margin-bottom: 0; +} + +img.icon { + float: right; +} + +/* Section anchors ---------------------------------*/ + +.hasAnchor { + margin-left: -30px; +} + +a.anchor { + display:inline-block; + width: 30px; + height: 30px; + visibility: hidden; + + background-image: url(./link.svg); + background-repeat: no-repeat; + background-size: 20px 20px; + background-position: center center; +} + +.hasAnchor:hover a.anchor { + visibility: visible; +} + +/* Fixes for fixed navbar --------------------------*/ + +.contents h1, .contents h2, .contents h3, .contents h4 { + padding-top: 60px; + margin-top: -60px; +} + +/* Sidebar --------------------------*/ + +#sidebar { + margin-top: 30px; +} +#sidebar h2 { + font-size: 1.5em; + margin-top: 1em; +} + +#sidebar h2:first-child { + margin-top: 0; +} + +#sidebar .list-unstyled li { + margin-bottom: 0.5em; +} + +/* Syntax highlighting ---------------------------------------------------- */ + +code { + background-color: #f7f7f7; + color: #333; +} +code a { + color: #375f84; +} + +.warning { color: red; } +.message { font-weight: bolder; } +.error { color: red; font-weight: bolder; } + +.fl,.number {color:rgb(21,20,181);} +.fu,.functioncall {color:#264D66 ;} +.ch,.st,.string {color:#375D81 ;} +.kw,.keyword {color:black;} +.argument {color:#264D66 ;} +.co,.comment {color: #777;} +.formalargs {color: #264D66;} +.eqformalargs {color:#264D66;} +.slot {font-style:italic;} +.symbol {color:black ;} +.prompt {color:black ;} + +pre img { + background-color: #fff; + display: block; +} diff --git a/docs/pkgdown.js b/docs/pkgdown.js new file mode 100644 index 0000000..c8b38c4 --- /dev/null +++ b/docs/pkgdown.js @@ -0,0 +1,8 @@ +$(function() { + $("#sidebar").stick_in_parent({offset_top: 40}); + $('body').scrollspy({ + target: '#sidebar', + offset: 60 + }); + +}); diff --git a/docs/reference/FOCUS_2006.html b/docs/reference/FOCUS_2006.html new file mode 100644 index 0000000..86ba53e --- /dev/null +++ b/docs/reference/FOCUS_2006.html @@ -0,0 +1,142 @@ + + + + + + + + + + — FOCUS_2006 • gmkin + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+
+ + + +

An gmkinws object with data taken from FOCUS (2006), Appendix + 3. This is the the workspace that is loaded into gmkin by + default.

+ + +
FOCUS_2006
+ +

Format

+ +

A list named FOCUS_2006 containing the components + needed to populate the gmkin user interface.

+ +

Source

+ +

FOCUS (2006) “Guidance Document on Estimating Persistence and + Degradation Kinetics from Environmental Fate Studies on Pesticides in EU + Registration” Report of the FOCUS Work Group on Degradation Kinetics, + EC Document Reference Sanco/10058/2005 version 2.0, 434 pp, + http://focus.jrc.ec.europa.eu/dk

+ + +

Examples

+
## Not run: ------------------------------------ +# save(FOCUS_2006, file = "FOCUS_2006.RData") +# # Now you can load the file "FOCUS_2006.RData" from gmkin, +# # restoring the workspace that is loaded at startup. +# +## ---------------------------------------------
+
+ +
+ +
+ + +
+

Site built with pkgdown.

+
+ +
+
+ + + diff --git a/docs/reference/FOCUS_2006_Z.html b/docs/reference/FOCUS_2006_Z.html new file mode 100644 index 0000000..7caa7d1 --- /dev/null +++ b/docs/reference/FOCUS_2006_Z.html @@ -0,0 +1,139 @@ + + + + + + + + + + — FOCUS_2006_Z • gmkin + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+
+ + + +

Data taken from FOCUS (2006), Appendix 7, p. 350.

+ + +
FOCUS_2006_Z
+ +

Format

+ +

An gmkinws object with dataset Z taken from FOCUS (2006), + together with most of the models used in the corresponding vignette.

+ +

Source

+ +

FOCUS (2006) “Guidance Document on Estimating Persistence and + Degradation Kinetics from Environmental Fate Studies on Pesticides in EU + Registration” Report of the FOCUS Work Group on Degradation Kinetics, + EC Document Reference Sanco/10058/2005 version 2.0, 434 pp, + http://focus.jrc.ec.europa.eu/dk

+ + +

Examples

+
## Not run: ------------------------------------ +# save(FOCUS_2006_Z, file = "FOCUS_2006_Z.RData") +# # Now you can load the file "FOCUS_2006_Z.RData" from gmkin +# +## ---------------------------------------------
+
+ +
+ +
+ + +
+

Site built with pkgdown.

+
+ +
+
+ + + diff --git a/docs/reference/UBA_model_gallery.html b/docs/reference/UBA_model_gallery.html new file mode 100644 index 0000000..92d6f89 --- /dev/null +++ b/docs/reference/UBA_model_gallery.html @@ -0,0 +1,140 @@ + + + + + + + + + + — UBA_model_gallery • gmkin + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+
+ + + +

The UBA model gallery contains predefined kinetic models for some common use + cases, with metabolites named as in the commonly used PELMO degradation + scheme (Jene 1998). Please use the model gallery of the gmkin + GUI to see their definitions. The models use the topology of the models + defined by Michael Klein (2010) for DegKinManager, with the exception of the + kinetic sorption model.

+ + +
data("UBA_model_gallery")
+ +

Format

+ +

A list containing 9 lists of four mkinmod models.

+ +

References

+ +

Klein M (2010) Calculation of rates constants according to FOCUS degradation + kinetics using DegKinManager and ModelMaker. Project report of UBA project + FKZ 360 03 048

+

Jene B (1998) PELMO 3.00 Manual extension, Staatliche Lehr- und + Forschungsanstalt für Landwirtschaft, Weinbau und Gartenbau, D-67435 + Neustadt/Wstr.

+ + +

Examples

+
data(UBA_model_gallery)
+
+ +
+ +
+ + +
+

Site built with pkgdown.

+
+ +
+
+ + + diff --git a/docs/reference/gmkin.html b/docs/reference/gmkin.html new file mode 100644 index 0000000..da80908 --- /dev/null +++ b/docs/reference/gmkin.html @@ -0,0 +1,158 @@ + + + + + + + + + + — gmkin • gmkin + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+
+ + + +

This function starts a browser based GUI. Please visit the + http://github.com/jverzani/gWidgetsWWW2 + for an explanation how this toolkit works.

+ + +
gmkin(script_name, show.log = FALSE)
+ +

Arguments

+
+
script_name
+
+ During development, a script name with a local working version + of gmkin can be passed. Defaults to the location of the gmkin.R script + shipped with the package. +
+
show.log
+
+ During development, it may be useful to see the log of the Rook apps. +
+
+ +

Value

+ +

The function is called for its side effect, namely starting the GUI in a browser. + For the curious, the desperate or the adventurous, the gmkin app (a GWidgetsApp object) is returned.

+ + +

Examples

+
## Not run: gmkin() # Start the gmkin GUI + ## Not run: ------------------------------------ +# g <- gmkin() +# +# # Only for debugging or other advanced usage: +# session <- gmkin:::get_current_session(g) +# session$p.df +# session$ds.df +# session$ds.cur +# session$m.cur +# session$ws +# +## ---------------------------------------------
+
+ +
+ +
+ + +
+

Site built with pkgdown.

+
+ +
+
+ + + diff --git a/docs/reference/gmkinws.html b/docs/reference/gmkinws.html new file mode 100644 index 0000000..203579e --- /dev/null +++ b/docs/reference/gmkinws.html @@ -0,0 +1,131 @@ + + + + + + + + +A workspace class for gmkin — gmkinws • gmkin + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+
+ + + +

Datasets, models and fits are stored in lists.

+ + +
gmkinws
+ +

Format

+ +

An R6Class generator object.

+ +

Fields

+ +

+

+
observed
Names of the observed variables in the datasets, named +by the names used in the models contained in field m

+

ds
A list of datasets compatible with mkinfit (long format)

+

m
A list of mkinmod models

+

f
A list of mkinfit objects
+

+ + +
+ +
+ +
+ + +
+

Site built with pkgdown.

+
+ +
+
+ + + diff --git a/docs/reference/index.html b/docs/reference/index.html new file mode 100644 index 0000000..ecd5dcd --- /dev/null +++ b/docs/reference/index.html @@ -0,0 +1,142 @@ + + + + + + + + +Function reference • gmkin + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+
+ + +
+

All functions

+

+ + +

+

+ + +

+

+ + +

+

+ + +

A workspace class for gmkin

+ + +

+

+ + +
+
+ + +
+ + +
+ + + -- cgit v1.2.1