aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2014-07-21 09:29:54 +0200
committerJohannes Ranke <jranke@uni-bremen.de>2014-07-21 09:29:54 +0200
commita89ee67280d2e2876b7ef4b6c345bc407ef2e0a9 (patch)
tree7d789dde3c2bec25137d79d6117ddea8efbdb29c /README.md
parenta1567638a3ba9f4d62fa199525097a94ddfd7912 (diff)
Simplify usage examples
Diffstat (limited to 'README.md')
-rw-r--r--README.md33
1 files changed, 16 insertions, 17 deletions
diff --git a/README.md b/README.md
index 48c667bf..d4f290dd 100644
--- a/README.md
+++ b/README.md
@@ -34,25 +34,25 @@ detailed guidance and helpful tools have been developed as detailed in
## Usage
-A very simple usage example would be
+The simplest usage example that I can think of, using model shorthand notation
+(available since mkin 0.9-32) and a built-in dataset is
library("mkin")
+ fit <- mkinfit("SFO", FOCUS_2006_C)
+ plot(fit, show_residuals = TRUE)
+ summary(fit)
+
+A still very simple usage example including the definition of the same data in R
+code would be
+
example_data = data.frame(
name = rep("parent", 9),
time = c(0, 1, 3, 7, 14, 28, 63, 91, 119),
value = c(85.1, 57.9, 29.9, 14.6, 9.7, 6.6, 4, 3.9, 0.6)
)
- SFO <- mkinmod(parent = list(type = "SFO"))
- SFO.fit <- mkinfit(SFO, example_data)
- plot(SFO.fit, show_residuals = TRUE)
- summary(SFO.fit)
+ fit2 <- mkinfit("FOMC", example_data)
-If you have parent only degradation data, you can use a shorthand notation
-like `SFO` or `FOMC` for the model without the need to use `mkinmod`
-
- FOMC.fit <- mkinfit("FOMC", example_data)
-
-A fairly complex usage example using a built-in dataset:
+A fairly complex usage example using another built-in dataset:
data <- mkin_wide_to_long(schaefer07_complex_case, time = "time")
@@ -63,16 +63,15 @@ A fairly complex usage example using a built-in dataset:
C1 = list(type = "SFO"),
A2 = list(type = "SFO"), use_of_ff = "max")
- fit <- mkinfit(model, data, method.modFit = "Port")
+ fit3 <- mkinfit(model, data, method.modFit = "Port")
- plot(fit, show_residuals = TRUE)
- summary(fit)
- mkinparplot(fit)
+ plot(fit3, show_residuals = TRUE)
+ summary(fit3)
+ mkinparplot(fit3)
For more examples and to see results, have a look at the examples provided in the
[`mkinfit`](http://kinfit.r-forge.r-project.org/mkin_static/mkinfit.html)
-documentation
-or the package vignettes referenced from the
+documentation or the package vignettes referenced from the
[mkin package documentation page](http://kinfit.r-forge.r-project.org/mkin_static/index.html)
## Features

Contact - Imprint