diff options
author | Johannes Ranke <jranke@uni-bremen.de> | 2024-11-18 19:04:11 +0100 |
---|---|---|
committer | Johannes Ranke <jranke@uni-bremen.de> | 2024-11-18 19:04:11 +0100 |
commit | d36f7665da7ed855885bbbcd17b203d3e8804bab (patch) | |
tree | b0c94eb6b726ddea5340f1bf6669078122b8d187 /README.md | |
parent | 74077191e562b9b2692e8342f8d190ec0be4431f (diff) |
Update badges in README.rmd
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 69 |
1 files changed, 39 insertions, 30 deletions
@@ -1,26 +1,28 @@ +--- +output: github_document +--- <!-- README.md is generated from README.rmd. Please edit that file --> + + # chemCal - Calibration functions for analytical chemistry <!-- badges: start --> - [![](https://www.r-pkg.org/badges/version/chemCal)](https://cran.r-project.org/package=chemCal) -[![Build -Status](https://app.travis-ci.com/jranke/chemCal.svg?token=Sq9VuYWyRz2FbBLxu6DK&branch=main)](https://app.travis-ci.com/jranke/chemCal) [![Codecov test coverage](https://codecov.io/gh/jranke/chemCal/graph/badge.svg)](https://app.codecov.io/gh/jranke/chemCal) [![R-CMD-check](https://github.com/jranke/chemCal/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/jranke/chemCal/actions/workflows/R-CMD-check.yaml) <!-- badges: end --> ## Overview -chemCal is an R package providing some basic functions for conveniently -working with linear calibration curves with one explanatory variable. +chemCal is an R package providing some basic functions for conveniently working +with linear calibration curves with one explanatory variable. ## Installation -From within [R](https://www.r-project.org/), get the official chemCal -release using +From within [R][r-project], get the official chemCal release using + ``` r install.packages("chemCal") @@ -28,12 +30,13 @@ install.packages("chemCal") ## Usage -chemCal works with univariate linear models of class `lm`. Working with -one of the datasets coming with chemCal, we can produce a calibration -plot using the `calplot` function: +chemCal works with univariate linear models of class `lm`. Working with one of +the datasets coming with chemCal, we can produce a calibration plot using the +`calplot` function: ### Plotting a calibration + ``` r library(chemCal) m0 <- lm(y ~ x, data = massart97ex3) @@ -44,8 +47,9 @@ calplot(m0) ### LOD and LOQ -If you use unweighted regression, as in the above example, we can -calculate a Limit Of Detection (LOD) from the calibration data. +If you use unweighted regression, as in the above example, we can calculate a +Limit Of Detection (LOD) from the calibration data. + ``` r lod(m0) @@ -55,16 +59,16 @@ lod(m0) #> $y #> [1] 13.63911 ``` - -This is the minimum detectable value (German: Erfassungsgrenze), -i.e. the value where the probability that the signal is not detected -although the analyte is present is below a specified error tolerance -beta (default is 0.05 following the IUPAC recommendation). +This is the minimum detectable value (German: Erfassungsgrenze), i.e. the +value where the probability that the signal is not detected although the +analyte is present is below a specified error tolerance beta (default is 0.05 +following the IUPAC recommendation). You can also calculate the decision limit (German: Nachweisgrenze), i.e. -the value that is significantly different from the blank signal with an -error tolerance alpha (default is 0.05, again following IUPAC -recommendations) by setting beta to 0.5. +the value that is significantly different from the blank signal +with an error tolerance alpha (default is 0.05, again following +IUPAC recommendations) by setting beta to 0.5. + ``` r lod(m0, beta = 0.5) @@ -76,9 +80,9 @@ lod(m0, beta = 0.5) ``` Furthermore, you can calculate the Limit Of Quantification (LOQ), being -defined as the value where the relative error of the quantification -given the calibration model reaches a prespecified value (default is -1/3). +defined as the value where the relative error of the quantification given the +calibration model reaches a prespecified value (default is 1/3). + ``` r loq(m0) @@ -91,9 +95,10 @@ loq(m0) ### Confidence intervals for measured values -Finally, you can get a confidence interval for the values measured using -the calibration curve, i.e. for the inverse predictions using the -function `inverse.predict`. +Finally, you can get a confidence interval for the values +measured using the calibration curve, i.e. for the inverse +predictions using the function `inverse.predict`. + ``` r inverse.predict(m0, 90) @@ -110,8 +115,9 @@ inverse.predict(m0, 90) #> [1] 40.70952 47.17014 ``` -If you have replicate measurements of the same sample, you can also give -a vector of numbers. +If you have replicate measurements of the same sample, +you can also give a vector of numbers. + ``` r inverse.predict(m0, c(91, 89, 87, 93, 90)) @@ -130,5 +136,8 @@ inverse.predict(m0, c(91, 89, 87, 93, 90)) ## Reference -You can use the R help system to view documentation, or you can have a -look at the [online documentation](https://pkgdown.jrwb.de/chemCal/). +You can use the R help system to view documentation, or you can +have a look at the [online documentation][pd-site]. + +[r-project]: https://www.r-project.org/ +[pd-site]: https://pkgdown.jrwb.de/chemCal/ |