From 966da79af48c371c05dd8011702ef2bd3b1d1e03 Mon Sep 17 00:00:00 2001
From: Johannes Ranke Johannes Ranke. Author, maintainer, copyright holder.
+ Static documentation of this R package can be found unter https://pkgdown.jrwb.de/chemCal GPL (>= 2)
@@ -90,7 +96,7 @@
diff --git a/docs/index.html b/docs/index.html
index b4cc3cf..e33d1ad 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -8,8 +8,17 @@
Developers
-
-
Author, maintainer, copyright holder
Author, maintainer, copyright holder Dev status
-
@@ -81,7 +88,7 @@
diff --git a/docs/pkgdown.css b/docs/pkgdown.css
index fd7b0ba..181fe63 100644
--- a/docs/pkgdown.css
+++ b/docs/pkgdown.css
@@ -34,13 +34,14 @@ img.icon {
float: right;
}
-/* Section anchors ---------------------------------*/
-
-.hasAnchor {
- margin-left: -30px;
+img {
+ max-width: 100%;
}
+/* Section anchors ---------------------------------*/
+
a.anchor {
+ margin-left: -30px;
display:inline-block;
width: 30px;
height: 30px;
@@ -56,6 +57,13 @@ a.anchor {
visibility: visible;
}
+@media (max-width: 767px) {
+ .hasAnchor:hover a.anchor {
+ visibility: hidden;
+ }
+}
+
+
/* Fixes for fixed navbar --------------------------*/
.contents h1, .contents h2, .contents h3, .contents h4 {
@@ -63,6 +71,17 @@ a.anchor {
margin-top: -60px;
}
+/* Static header placement on mobile devices */
+@media (max-width: 767px) {
+ .navbar-fixed-top {
+ position: absolute;
+ }
+ .navbar {
+ padding: 0;
+ }
+}
+
+
/* Sidebar --------------------------*/
#sidebar {
@@ -81,33 +100,95 @@ a.anchor {
margin-bottom: 0.5em;
}
+.orcid {
+ height: 16px;
+ vertical-align: middle;
+}
+
+/* Reference index & topics ----------------------------------------------- */
+
+.ref-index th {font-weight: normal;}
+.ref-index h2 {font-size: 20px;}
+
+.ref-index td {vertical-align: top;}
+.ref-index .alias {width: 40%;}
+.ref-index .title {width: 60%;}
+
+.ref-index .alias {width: 40%;}
+.ref-index .title {width: 60%;}
+
+.ref-arguments th {text-align: right; padding-right: 10px;}
+.ref-arguments th, .ref-arguments td {vertical-align: top;}
+.ref-arguments .name {width: 20%;}
+.ref-arguments .desc {width: 80%;}
+
+/* Nice scrolling for wide elements --------------------------------------- */
+
+table {
+ display: block;
+ overflow: auto;
+}
+
/* Syntax highlighting ---------------------------------------------------- */
-code {
- background-color: #f7f7f7;
- color: #333;
+pre {
+ word-wrap: normal;
+ word-break: normal;
+ border: 1px solid #eee;
}
-code a {
- color: #375f84;
+
+pre, code {
+ background-color: #f8f8f8;
+ color: #333;
}
-.warning { color: red; }
-.message { font-weight: bolder; }
-.error { color: red; font-weight: bolder; }
+pre code {
+ overflow: auto;
+ word-wrap: normal;
+ white-space: pre;
+}
-.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 {
+ margin: 5px 0;
+}
-pre img {
+pre .img img {
background-color: #fff;
display: block;
+ height: auto;
+}
+
+code a, pre a {
+ color: #375f84;
+}
+
+a.sourceLine:hover {
+ text-decoration: none;
+}
+
+.fl {color: #1514b5;}
+.fu {color: #000000;} /* function */
+.ch,.st {color: #036a07;} /* string */
+.kw {color: #264D66;} /* keyword */
+.co {color: #888888;} /* comment */
+
+.message { color: black; font-weight: bolder;}
+.error { color: orange; font-weight: bolder;}
+.warning { color: #6A0366; font-weight: bolder;}
+
+/* Clipboard --------------------------*/
+
+.hasCopyButton {
+ position: relative;
+}
+
+.btn-copy-ex {
+ position: absolute;
+ right: 0;
+ top: 0;
+ visibility: hidden;
+}
+
+.hasCopyButton:hover button.btn-copy-ex {
+ visibility: visible;
}
diff --git a/docs/pkgdown.js b/docs/pkgdown.js
index c8b38c4..64b20df 100644
--- a/docs/pkgdown.js
+++ b/docs/pkgdown.js
@@ -1,8 +1,94 @@
$(function() {
- $("#sidebar").stick_in_parent({offset_top: 40});
+
+ $("#sidebar")
+ .stick_in_parent({offset_top: 40})
+ .on('sticky_kit:bottom', function(e) {
+ $(this).parent().css('position', 'static');
+ })
+ .on('sticky_kit:unbottom', function(e) {
+ $(this).parent().css('position', 'relative');
+ });
+
$('body').scrollspy({
target: '#sidebar',
offset: 60
});
+ var cur_path = paths(location.pathname);
+ $("#navbar ul li a").each(function(index, value) {
+ if (value.text == "Home")
+ return;
+ if (value.getAttribute("href") === "#")
+ return;
+
+ var path = paths(value.pathname);
+ if (is_prefix(cur_path, path)) {
+ // Add class to parent
calplot(object, xlim = c("auto", "auto"), ylim = c("auto", "auto"), +calplot(object, xlim = c("auto", "auto"), ylim = c("auto", "auto"), xlab = "Concentration", ylab = "Response", alpha=0.05, varfunc = NULL)Arguments
-
lm
or
+ object | +A univariate model object of class y ~ x or y ~ x - 1 . |
+
---|---|
xlim | +The limits of the plot on the x axis. |
+
ylim | +The limits of the plot on the y axis. |
+
xlab | +The label of the x axis. |
+
ylab | +The label of the y axis. |
+
alpha | +The error tolerance level for the confidence and prediction bands. Note that this
includes both tails of the Gaussian distribution, unlike the alpha and beta parameters
- used in lod (see note below). |
+
varfunc | +The variance function for generating the weights in the model. + Currently, this argument is ignored (see note below). |
+
predict.lm
, therefore,
- calplot
does not draw prediction bands for such models.
- It is possible to compare the calplot
prediction bands with the
- lod
values if the lod()
alpha and beta parameters are
+ calplot
does not draw prediction bands for such models.
It is possible to compare the calplot
prediction bands with the
+ lod
values if the lod()
alpha and beta parameters are
half the value of the calplot()
alpha parameter.
+calplot(m) @@ -167,7 +178,7 @@ diff --git a/docs/reference/chemCal-package.html b/docs/reference/chemCal-package.html index b720fc9..ee92d84 100644 --- a/docs/reference/chemCal-package.html +++ b/docs/reference/chemCal-package.html @@ -6,8 +6,7 @@ -data(massart97ex3) m <- lm(y ~ x, data = massart97ex3) -calplot(m)
See ../DESCRIPTION
+See ../DESCRIPTION
There is a package vignette located in ../doc/chemCal.pdf.
+There is a package vignette located in ../doc/chemCal.pdf.
Sample dataset to test the package.
-data(din32645)+
data(din32645)
DIN 32645 (equivalent to ISO 11843), Beuth Verlag, Berlin, 1994
-Dintest. Plugin for MS Excel for evaluations of calibration data. Written +
Dintest. Plugin for MS Excel for evaluations of calibration data. Written by Georg Schmitt, University of Heidelberg. Formerly available from the Website of the University of Heidelberg.
-Currie, L. A. (1997) Nomenclature in evaluation of analytical methods including +
Currie, L. A. (1997) Nomenclature in evaluation of analytical methods including detection and quantification capabilities (IUPAC Recommendations 1995). Analytica Chimica Acta 391, 105 - 126.
@@ -96,9 +105,9 @@+3.04 * lod(m,alpha = 0.01, beta = 0.5)$x+calplot(m)#> $Prediction +(prediction <- inverse.predict(m, 3500, alpha = 0.01))#> $Prediction #> [1] 0.1054792 #> #> $`Standard Error` @@ -114,7 +123,7 @@ # was collected from Procontrol 3.1 (isomehr GmbH) in this case round(prediction$Confidence,5)#> [1] 0.07434#> $x +(crit <- lod(m, alpha = 0.01, beta = 0.5))#> $x #> [1] 0.0698127 #> #> $y @@ -129,12 +138,12 @@ # In German, the smallest detectable value is the "Erfassungsgrenze", and we # should get 0.14 according to DIN, which we achieve by using the method # described in it: -lod.din <- lod(m, alpha = 0.01, beta = 0.01, method = "din") +lod.din <- lod(m, alpha = 0.01, beta = 0.01, method = "din") round(lod.din$x, 2)#> [1] 0.14## Limit of quantification # This accords to the test data coming with the test data from Dintest again, # except for the last digits of the value cited for Procontrol 3.1 (0.2121) -(loq <- loq(m, alpha = 0.01))#> $x +(loq <- loq(m, alpha = 0.01))#> $x #> [1] 0.2119575 #> #> $y @@ -143,7 +152,7 @@ #>round(loq$x,4)#> [1] 0.212# A similar value is obtained using the approximation # LQ = 3.04 * LC (Currie 1999, p. 120) -3.04 * lod(m,alpha = 0.01, beta = 0.5)$x#> [1] 0.2122306
Plot calibration graphs from univariate linear models
- - - -chemCal-package
Calibration data from DIN 32645
-din32645
Predict x from y for a linear calibration
- - -Estimate a limit of detection (LOD)
- - -Estimate a limit of quantification (LOQ)
- - -Calibration data from Massart et al. (1997), example 1
-massart97ex1
Calibration data from Massart et al. (1997), example 3
-massart97ex3
inverse.predict(object, newdata, …, +inverse.predict(object, newdata, …, ws, alpha=0.05, var.s = "auto")Arguments
-
lm
or
+ object | +A univariate model object of class object has weights.
- y ~ x or y ~ x - 1 . |
+
---|---|
newdata | +A vector of observed y values for one sample. |
+
… | +Placeholder for further arguments that might be needed by + future implementations. |
+
ws | +The weight attributed to the sample. This argument is obligatory
+ if |
+
alpha | +The error tolerance level for the confidence interval to be reported. |
+
var.s | +The estimated variance of the sample measurements. The default is to take
the residual standard error from the calibration and to adjust it
using |
+
lod(object, …, alpha = 0.05, beta = 0.05, method = "default", tol = "default")+
lod(object, …, alpha = 0.05, beta = 0.05, method = "default", tol = "default")
lm
or
+ object | +A univariate model object of class |
+
---|---|
… | +Placeholder for further arguments that might be needed by + future implementations. |
+
alpha | +The error tolerance for the decision limit (critical value). |
+
beta | +The error tolerance beta for the detection limit. |
+
method | +The “default” method uses a prediction interval at the LOD for the estimation of the LOD, which obviously requires iteration. This is described for example in Massart, p. 432 ff. The “din” method uses the prediction interval at - x = 0 as an approximation. - - |
+
tol | +When the “default” method is used, the default tolerance for the LOD on the x scale is the value of the smallest non-zero standard - divided by 1000. Can be set to a numeric value to override this. - - + divided by 1000. Can be set to a numeric value to override this. |
+
Massart, L.M, Vandenginste, B.G.M., Buydens, L.M.C., De Jong, S., Lewi, P.J., Smeyers-Verbeke, J. (1997) Handbook of Chemometrics and Qualimetrics: Part A, Chapter 13.7.8
-J. Inczedy, T. Lengyel, and A.M. Ure (2002) International Union of Pure and +
J. Inczedy, T. Lengyel, and A.M. Ure (2002) International Union of Pure and Applied Chemistry Compendium of Analytical Nomenclature: Definitive Rules. Web edition.
-Currie, L. A. (1997) Nomenclature in evaluation of analytical methods including +
Currie, L. A. (1997) Nomenclature in evaluation of analytical methods including detection and quantification capabilities (IUPAC Recommendations 1995). Analytica Chimica Acta 391, 105 - 126.
Examples for din32645
Examples for din32645
inverse.predict
, and L is obtained by iteration.
+ inverse.predict
, and L is obtained by iteration.
- loq(object, …, alpha = 0.05, k = 3, n = 1, w.loq = "auto", +loq(object, …, alpha = 0.05, k = 3, n = 1, w.loq = "auto", var.loq = "auto", tol = "default")Arguments
-
lm
or
+ object | +A univariate model object of class |
+
---|---|
alpha | +The error tolerance for the prediction of x values in the calculation. |
+
… | +Placeholder for further arguments that might be needed by + future implementations. |
+
k | +The inverse of the maximum relative error tolerated at the + desired LOQ. |
+
n | +The number of replicate measurements for which the LOQ should be + specified. |
+
w.loq | +The weight that should be attributed to the LOQ. Defaults
to one for unweighted regression, and to the mean of the weights
- for weighted regression. See |
+
var.loq | +The approximate variance at the LOQ. The default value is + calculated from the model. |
+
tol | +The default tolerance for the LOQ on the x scale is the value of the smallest non-zero standard divided by 1000. Can be set to a - numeric value to override this. - - + numeric value to override this. |
+
Examples for din32645
Examples for din32645
Sample dataset from p. 175 to test the package.
-data(massart97ex1)+
data(massart97ex1)
Sample dataset from p. 188 to test the package.
-data(massart97ex3)+
data(massart97ex3)