aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
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