From ae13a2e7f373f697cdfb6acb7ae042d6e27d8967 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Fri, 24 Mar 2017 15:22:07 +0100 Subject: Add pkgdown docu, change package build directory --- GNUmakefile | 16 +- docs/authors.html | 99 ++++++++++++ docs/index.html | 88 +++++++++++ docs/jquery.sticky-kit.min.js | 9 ++ docs/link.svg | 12 ++ docs/pkgdown.css | 137 ++++++++++++++++ docs/pkgdown.js | 8 + docs/reference/antifoul.html | 160 +++++++++++++++++++ docs/reference/checkcontrols.html | 159 +++++++++++++++++++ docs/reference/checkexperiment.html | 143 +++++++++++++++++ docs/reference/checksubstance.html | 176 +++++++++++++++++++++ docs/reference/drcfit.html | 251 ++++++++++++++++++++++++++++++ docs/reference/drdata.html | 245 +++++++++++++++++++++++++++++ docs/reference/drfit-package-9.png | Bin 0 -> 20004 bytes docs/reference/drfit-package.html | 141 +++++++++++++++++ docs/reference/drfit.html | 300 ++++++++++++++++++++++++++++++++++++ docs/reference/drplot.html | 268 ++++++++++++++++++++++++++++++++ docs/reference/index.html | 195 +++++++++++++++++++++++ 18 files changed, 2400 insertions(+), 7 deletions(-) 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/pkgdown.css create mode 100644 docs/pkgdown.js create mode 100644 docs/reference/antifoul.html create mode 100644 docs/reference/checkcontrols.html create mode 100644 docs/reference/checkexperiment.html create mode 100644 docs/reference/checksubstance.html create mode 100644 docs/reference/drcfit.html create mode 100644 docs/reference/drdata.html create mode 100644 docs/reference/drfit-package-9.png create mode 100644 docs/reference/drfit-package.html create mode 100644 docs/reference/drfit.html create mode 100644 docs/reference/drplot.html create mode 100644 docs/reference/index.html diff --git a/GNUmakefile b/GNUmakefile index 64aa9d4..6b5e68c 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -1,7 +1,7 @@ PKGNAME := $(shell sed -n "s/Package: *\([^ ]*\)/\1/p" DESCRIPTION) PKGVERS := $(shell sed -n "s/Version: *\([^ ]*\)/\1/p" DESCRIPTION) PKGSRC := $(shell basename $(PWD)) -TGZ := ../$(PKGNAME)_$(PKGVERS).tar.gz +TGZ := $(PKGNAME)_$(PKGVERS).tar.gz # Specify the directory holding R binaries. To use an alternate R build (say a # pre-prelease version) use `make RBIN=/path/to/other/R/` or `export RBIN=...` @@ -10,16 +10,18 @@ TGZ := ../$(PKGNAME)_$(PKGVERS).tar.gz RBIN ?= $(shell dirname "`which R`") build: - cd ..;\ - "$(RBIN)/R" CMD build $(PKGSRC) + "$(RBIN)/R" CMD build . install: build - cd ..;\ - "$(RBIN)/R" CMD INSTALL $(PKGNAME)_$(PKGVERS).tar.gz + "$(RBIN)/R" CMD INSTALL $(TGZ) check: build - cd ..;\ - "$(RBIN)/R" CMD check --as-cran $(PKGNAME)_$(PKGVERS).tar.gz + "$(RBIN)/R" CMD check --as-cran $(TGZ) + +pd: + "$(RBIN)/Rscript" -e "pkgdown::build_site()" + git add -A + git commit -m 'Static documentation rebuilt by pkgdown::build_site()' -e winbuilder: build @echo "Uploading to R-release on win-builder" diff --git a/docs/authors.html b/docs/authors.html new file mode 100644 index 0000000..3db937a --- /dev/null +++ b/docs/authors.html @@ -0,0 +1,99 @@ + + + + + + + + +Authors • drfit + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+
+ + +
    +
  • +

    Johannes Ranke. Author, maintainer. +

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

Site built with pkgdown.

+
+ +
+
+ + + diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 0000000..3ad6d4a --- /dev/null +++ b/docs/index.html @@ -0,0 +1,88 @@ + + + + + + + +Dose-Response Data Evaluation • drfit + + + + + + +
+
+ + + +
+
+ A somewhat outdated package of basic and easy-to-use functions for + fitting dose-response curves to continuous dose-response data, calculating some + (eco)toxicological parameters and plotting the results. Please consider using + the more powerful and actively developed 'drc' package. Functions that are + fitted are the cumulative density function of the lognormal distribution + (probit fit), of the logistic distribution (logit fit), of the weibull + distribution (weibull fit) and a linear-logistic model ("linlogit" fit), + derived from the latter, which is used to describe data showing stimulation at + low doses (hormesis). In addition, functions checking, plotting and retrieving + dose-response data retrieved from a database accessed via RODBC are included. + As an alternative to the original fitting methods, the algorithms from the drc + package can be used. +
+ + +
+ + +
+ +
+

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/pkgdown.css b/docs/pkgdown.css new file mode 100644 index 0000000..e704e06 --- /dev/null +++ b/docs/pkgdown.css @@ -0,0 +1,137 @@ +/* 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; +} + +/* 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; +} +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/antifoul.html b/docs/reference/antifoul.html new file mode 100644 index 0000000..5a2b886 --- /dev/null +++ b/docs/reference/antifoul.html @@ -0,0 +1,160 @@ + + + + + + + + +Dose-Response data for TBT and Zink Pyrithione in IPC-81 cells — antifoul • drfit + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+
+ + + +

This data set shows the response of the rat leukaemic cell line IPC-81 to + dilution series of tributyltin chloride (TBT) and Zink Pyrithione as retrieved + from the "cytotox" database of the UFT Department of Bioorganic Chemistry on + February 25, 2004

+ + +
data(antifoul)
+ +

Format

+ +

A dataframe containing 135 and 81 data points for concentrations and responses + for TBT and Zink Pyrithione, respectively. Some additional columns from the + database are also present.

+ +

Source

+ +

http://www.uft.uni-bremen.de/chemie

+ + +

Examples

+
rantifoul.ED50 <- drfit(antifoul, + linlogit = TRUE, logit = TRUE, weibull = TRUE, + chooseone = FALSE, + showED50 = TRUE, EDx = c(10))
#> +#> TBT: Fitting data...
#> Waiting for profiling to be done...
#> Waiting for profiling to be done...
#> Waiting for profiling to be done...
#> +#> Zn Pyrithion: Fitting data...
#> Waiting for profiling to be done...
#> Waiting for profiling to be done...
#> Waiting for profiling to be done...
print(rantifoul.ED50, digits = 5)
#> Substance ndl n lld lhd mtype logED50 2.5% 97.5% +#> 1 TBT 38 135 -2.7093 2.3979 linlogit -0.15809 -0.26021 -0.050475 +#> 2 TBT 38 135 -2.7093 2.3979 probit -0.16436 -0.26504 -0.056498 +#> 3 TBT 38 135 -2.7093 2.3979 logit -0.16012 -0.26116 -0.052591 +#> 4 TBT 38 135 -2.7093 2.3979 weibull -0.11507 NA NA +#> 5 Zn Pyrithion 27 81 -2.1072 2.0000 linlogit -0.41329 -0.52932 -0.299799 +#> 6 Zn Pyrithion 27 81 -2.1072 2.0000 probit -0.39792 -0.50783 -0.291563 +#> 7 Zn Pyrithion 27 81 -2.1072 2.0000 logit -0.40035 -0.51049 -0.293501 +#> 8 Zn Pyrithion 27 81 -2.1072 2.0000 weibull -0.38795 NA NA +#> unit sigma a b c ED50 ED50 2.5% ED50 97.5% +#> 1 microM 0.19264 -0.15809 1.04065 -0.024165 0.69487 0.54927 0.89028 +#> 2 microM 0.19286 -0.16436 0.67637 NA 0.68493 0.54320 0.87801 +#> 3 microM 0.19199 -0.16012 0.41358 NA 0.69164 0.54808 0.88595 +#> 4 microM 0.18810 0.63743 1.28891 NA 0.76724 NA NA +#> 5 microM 0.22878 -0.41329 1.74249 0.610810 0.38611 0.29558 0.50142 +#> 6 microM 0.22866 -0.39792 0.41696 NA 0.40002 0.31058 0.51102 +#> 7 microM 0.22802 -0.40035 0.25395 NA 0.39779 0.30868 0.50874 +#> 8 microM 0.23008 0.47647 2.51561 NA 0.40931 NA NA +#> EDx10 +#> 1 0.085214 +#> 2 0.093077 +#> 3 0.085340 +#> 4 0.053392 +#> 5 0.120232 +#> 6 0.116872 +#> 7 0.110068 +#> 8 0.121166
+rantifoul.drc <- drcfit(antifoul, + linlogit = TRUE, logit = TRUE, weibull = TRUE, + chooseone = FALSE, + showED50 = TRUE, EDx = c(10))
#> +#> TBT: Fitting data...
#> Error in ED50["1:50", "Lower"]: Indizierung außerhalb der Grenzen
print(rantifoul.drc, digits = 5)
#> Error in print(rantifoul.drc, digits = 5): Objekt 'rantifoul.drc' nicht gefunden
+
+ +
+ +
+ + +
+

Site built with pkgdown.

+
+ +
+
+ + + diff --git a/docs/reference/checkcontrols.html b/docs/reference/checkcontrols.html new file mode 100644 index 0000000..2b2eb8b --- /dev/null +++ b/docs/reference/checkcontrols.html @@ -0,0 +1,159 @@ + + + + + + + + +Check raw data from range of plates or experiments — checkcontrols • drfit + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+
+ + + +

Report control data from a specified range of microtiter plates or + experiments from a specified database.

+ + +
checkcontrols(last = 10, id = NULL, db = "cytotox", organism = "Vibrio fischeri",
+                endpoint = "%", qcc = c("R", "xbar"))
+ +

Arguments

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
last

If id is not specified, this argument specifies the number of + plates/experiments that should be evaluated. The plates/experiments with + the hightest numbers are selected.

id

A numeric vector of integers, specifying the plates or experiments explicitly.

db

The database to be used. Currently, the microtiter plate databases + "cytotox", "enzymes" of the UFT Department of Bioorganic Chemistry are + supported, as well as the database of ecotoxicity experiments "ecotox".

organism

The organism that was exposed to the chemical. Only important if the database + "ecotox" is used. Defaults to "Vibrio fischeri".

endpoint

The endpoint that should be used for selecting the data. Only important if + the database "ecotox" is used. Defaults to "%".

qcc

The type of quality control charts to be plotted. By default, an R chart + (showing ranges of control values within plates/experiments), and an + xbar chart (showing means) are generated.

+ +

Value

+ +

The function lists a report and shows two graphs.

+ + +

Examples

+
## Not run: checkcontrols(15)
+
+ +
+ +
+ + +
+

Site built with pkgdown.

+
+ +
+
+ + + diff --git a/docs/reference/checkexperiment.html b/docs/reference/checkexperiment.html new file mode 100644 index 0000000..e22705d --- /dev/null +++ b/docs/reference/checkexperiment.html @@ -0,0 +1,143 @@ + + + + + + + + +Check raw data from a specified experiment or microtiter plate — checkexperiment • drfit + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+
+ + + +

Report metadata from a specified experiment or microtiter plate from a + specified database, box plot controls, and plot the dose-response data.

+ + +
checkplate(id, db = "cytotox")
+  checkexperiment(id, db = "ecotox", endpoint = "%")
+ +

Arguments

+ + + + + + + + + + + + + + +
id

The id of the experiment or the plate identifying it within the database.

db

The database to be used. Currently, the microtiter plate databases + "cytotox", "enzymes" of the UFT Department of Bioorganic Chemistry are + supported, as well as the database of ecotoxicity experiments "ecotox".

endpoint

The endpoint that should be used for selecting the data. Only important if + the database "ecotox" is used. Defaults to "%".

+ +

Value

+ +

The function lists a report and shows two graphs.

+ + +

Examples

+
# Check plate number 3 in the cytotox database +## Not run: checkplate(3)
+
+ +
+ +
+ + +
+

Site built with pkgdown.

+
+ +
+
+ + + diff --git a/docs/reference/checksubstance.html b/docs/reference/checksubstance.html new file mode 100644 index 0000000..0fbca62 --- /dev/null +++ b/docs/reference/checksubstance.html @@ -0,0 +1,176 @@ + + + + + + + + +Check raw data for a specified substance — checksubstance • drfit + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+
+ + + +

Report metadata for a specified substance from a specified database, and plot + the data.

+ + +
checksubstance(substance, db = "cytotox", experimentator = "%",
+    celltype = "%", enzymetype = "%", organism = "%",
+    endpoint = "%",
+    whereClause = "1", ok = "%")
+ +

Arguments

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
substance

The name of the substance identifying it within the database.

db

The database to be used. Currently, the databases "cytotox" and "enzymes" + of the UFT Department of Bioorganic Chemistry are supported (default is + "cytotox").

experimentator

The name of the experimentator whose data is to be used. Default is "%", + which means that data from all experimentators are shown.

celltype

Currently, only data for IPC-81, C6, NB4, HeLa, Jurkat and U937 are + supported. Default is "%", i.e. data for any cell type will be + displayed.

enzymetype

Currently, only data for AChE, GR and GST are supported. The default value + is "%", i.e. data for any enzyme type will be displayed.

organism

The latin name of the tested organism, if the ecotox db was selected. The + default value is "%", i.e. data for any organism will be displayed.

endpoint

The endpoint that should be used for selecting the data. Only important if + the database "ecotox" is used. Defaults to "%".

whereClause

With this argument, additional conditions for the SQL query can be set, + e.g. "plate != 710". The default is 1 (in SQL syntax this means TRUE).

ok

With the default value "%", all data in the database is retrieved for the + specified substance.

+ +

Value

+ +

The function lists a report and shows one graph.

+ + +

Examples

+
# Check substance IM14 BF4 in the cytotox database +## Not run: checksubstance("IM14 BF4")
+
+ +
+ +
+ + +
+

Site built with pkgdown.

+
+ +
+
+ + + diff --git a/docs/reference/drcfit.html b/docs/reference/drcfit.html new file mode 100644 index 0000000..ccf4641 --- /dev/null +++ b/docs/reference/drcfit.html @@ -0,0 +1,251 @@ + + + + + + + + +Fit dose-response models using the drc package — drcfit • drfit + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+
+ + + +

Fit dose-response relationships to dose-response data and calculate + biometric results for (eco)toxicity evaluation using the drc package

+ + +
drcfit(data, chooseone = TRUE, probit = TRUE, logit = FALSE,
+  weibull = FALSE, linlogit = FALSE, level = 0.95,
+  showED50 = FALSE, EDx = NULL)
+ +

Arguments

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
data

A data frame containing dose-response data. The data frame has to contain + at least a factor called “substance”, a numeric vector “dose” + with the dose values, a vector called “unit” containing the unit + used for the dose and a numeric vector “response” with the response + values of the test system normalized between 0 and 1. Such a data frame can + be easily obtained if a compliant RODBC data source is available for use in + conjunction with the function drdata.

+

If there is a column called “ok” and it is set to “no fit” in + a specific line, then the corresponding data point will be excluded from + the fitting procedure, although it will be plotted.

probit

A boolean defining if cumulative density curves of normal distributions + are fitted against the decadic logarithm of the dose. Default ist TRUE. + Note that the parameter definitions used in the model are different to the + ones used in drfit. Parameter e from LN.2 is listed + as a here, and parameter b from there is listed as b.

logit

A boolean defining if cumulative density curves of logistic distributions + plogis are fitted to the decadic logarithm of the dose. + Default is FALSE. + Again the parameter definitions used in the model are different to the + ones used in drfit. Parameter e from LL.2 is listed + as a here, and parameter b from LL.2 is listed as b.

weibull

A boolean defining if Weibull dose-response models + (W1.2 are fitted to the untransformed dose. Default is FALSE. + Note that the results differ from the ones obtained with + drfit, due to a different model specification.

linlogit

A boolean defining if the linear-logistic function + linlogitf as defined by van Ewijk and Hoekstra 1993 is + fitted to the data. Default is FALSE. Obtaining the ED50 (and EDx values + in general) uses ED internally and does not always give a + result.

level

The level for the confidence interval listed for the log ED50.

chooseone

If TRUE (default), the models are tried in the order linlogit, probit, + logit, weibull, and the first model that produces a valid fit is used. + If FALSE, all models that are set to TRUE and that can be fitted will be + reported.

EDx

A vector of inhibition values x in percent for which the corresponding doses + EDx should be reported.

showED50

If set to TRUE, the ED50 and its confidence interval on the original dose + scale (not log scale) is included in the output.

+ +

Value

+ +

A dataframe with the attribute models holding a list of the fitted + dose-response models of class nls. The dataframe has at least + one line for each substance.

+

The following variables are in the dataframe:

+
Substance

The name of the substance

+
ndl

The number of dose levels in the raw data

+
n

The total number of data points in the raw data used for the fit

+
lld

The decadic logarithm of the lowest dose

+
lhd

The total number of data points in the raw data used for the fit

+
mtype

If the data did not show a mean response < 0.5 at the highest dose level, + the modeltype is set to “inactive”. If the mean response at the + lowest dose is smaller than 0.5, the modeltype is set to “active”. + In both cases, no fitting procedure is carried out. If the fitted ED50 + is higher than the highest dose, “no fit” is given here.

+
logED50

The decadic logarithm of the ED50

+
low %

The lower bound of the confidence interval of log ED50. + The name of the column depends on the requested confidence level.

+
high %

The higher bound of the confidence interval of log ED50. + The name of the column depends on the requested confidence level.

+
unit

The unit used for the dose levels in the dose-response data

+
sigma

The square root of the estimated variance of the random error as returned + by summary.drc.

+
a

For the linlogit model, this is the parameter e from BC.4. + For the probit and the logit model, this is the ED50. For the weibull + model, this is parameter e from W1.2. Note that the Weibull + model is fitted to the untransformed data.

+
b

For the linlogit, probit, logit and weibull models, these are the + parameters b from BC.4, LN.2, + LL.2 and W1.2, respectively. + Note that the parameter definitions (and in the case of Weibull, the model + used) are different to the ones used in drfit.

+
c

Only the “linlogit” fit produces a third parameter c, which is + the parameter f from the BC.4 function.

+ If the parameter showED50 was set to TRUE, the ED50 values and their + confidence intervals are also included on the original dose scale. + + If one or more response leves were specified in the argument EDx, + the corresponding dose levels are given in addition, together with their + confidence intervals as calculated by ED from the drc package. + + +

Note

+ +

There is a demo for each dataset that can be accessed by + demo(dataset)

+ +

See also

+ +

Further examples are given in help pages to the datasets + antifoul, IM1xIPC81 and + IM1xVibrio.

+ + +

Examples

+
data(antifoul) +r <- drcfit(antifoul, showED50 = TRUE, EDx = c(5, 10, 20))
#> +#> TBT: Fitting data...
#> Error in ED50["1:50", "Lower"]: Indizierung außerhalb der Grenzen
format(r, digits = 2)
#> Error in format(r, digits = 2): Objekt 'r' nicht gefunden
+
+ +
+ +
+ + +
+

Site built with pkgdown.

+
+ +
+
+ + + diff --git a/docs/reference/drdata.html b/docs/reference/drdata.html new file mode 100644 index 0000000..e369c5c --- /dev/null +++ b/docs/reference/drdata.html @@ -0,0 +1,245 @@ + + + + + + + + +Get dose-response data via RODBC — drdata • drfit + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+
+ + + +

Get dose-response data from an adequate ODBC data source

+ + +
drdata(substances, experimentator = "%", db = "cytotox", celltype = "IPC-81",
+    enzymetype="AChE", organism="Vibrio fischeri", endpoint="Luminescence",
+    whereClause = "1", ok = "'ok','no fit'")
+ +

Arguments

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
substances

A string or an array of strings with the substance names for + which dose-response data is to be retrieved.

experimentator

The name of the experimentator whose data is to be used. Default is " + which means that data from all experimentators are retrieved.

db

The database to be used. Currently, the databases "cytotox", "enzymes" + and "ecotox" of the UFT Department of Bioorganic Chemistry are + supported (default is "cytotox").

celltype

Currently, only data for IPC-81, C6, NB4, HeLa, Jurkat and U937 are + supported.

enzymetype

Currently, only data for AChE, GR and GST are supported.

organism

The organism that was exposed to the chemical. Only important if the database + "ecotox" is used. Defaults to "Vibrio fischeri".

endpoint

The endpoint that should be used for selecting the data. Only important if + the database "ecotox" is used. Defaults to "Luminescence".

whereClause

With this argument, additional conditions for the SQL query can be set, + e.g. "plate != 710" (i.e. "Do not retrieve data for plate 710"). The + default is 1 (in SQL syntax this means TRUE).

ok

With the default value "'ok','no fit'", only data that has been checked and + set to "ok" or "no fit" in the database is retrieved. The argument "no fit" + will result in not using the data for fitting, but it will be plotted. + Another sensible argument would be "'ok','no fit','?'", in order to + additionally retrieve data which has not yet been checked.

+ +

Value

+ +

+
data

A data frame with a factor describing the dose levels, the numeric dose + levels and a numeric column describing the response, as well as the entries + for plate, experimentator, performed (date of test performance), celltype, + unit (of the dose/concentration), and for the ok field in the database.

+ + +

Details

+ +

The function is currently only used for retrieving data from the + mysql database "cytotox" of the UFT Department of Bioorganic Chemistry. + Access to this database is limited to UFT staff. Additionally to the + installation of the RODBC package, it is required to set up a ODBC data + source with the name "cytotox", using an ODBC driver for mysql, probably + myODBC. Then, under Unix, you can use iodbc or unixodbc for setting up the + respective data source with data source name (DSN) "cytotox". For my + setting using unixodbc, I am using the file /etc/odbcinst.ini + containing:

+ + + + + + + + + + + +
+ [MySQL]
+ Description
= MySQL driver for ODBC
+ Driver =
/usr/local/lib/libmyodbc.so + Setup
= /usr/lib/odbc/libodbcmyS.so

and the file /etc/odbc.ini containing:

+ + + + + + + + + + + + + + + + + + + + + + + +
+ [cytotox]
+ Description
= Cytotoxicity database of the department of bioorganic chemistry, UFT Bremen
+ Driver =
MySQL + Trace
= Yes
+ TraceFile =
/tmp/odbc.log + Database
= cytotox
+ Server =
eckehaat + Port
= 3306
+ + +

Examples

+
# Get cytotoxicity data for Tributyltin and zinc pyrithione, tested with IPC-81 +# cells +## Not run: drdata(c("TBT","ZnPT2"))
+
+ +
+ +
+ + +
+

Site built with pkgdown.

+
+ +
+
+ + + diff --git a/docs/reference/drfit-package-9.png b/docs/reference/drfit-package-9.png new file mode 100644 index 0000000..1095620 Binary files /dev/null and b/docs/reference/drfit-package-9.png differ diff --git a/docs/reference/drfit-package.html b/docs/reference/drfit-package.html new file mode 100644 index 0000000..17611e7 --- /dev/null +++ b/docs/reference/drfit-package.html @@ -0,0 +1,141 @@ + + + + + + + + +Dose-response data evaluation — drfit-package • drfit + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+
+ + + +

See ../DESCRIPTION

+ + + +

Details

+ +

There is an introductory article located in ../doc/drfit-Rnews.pdf, +which will be published in the R News special edition on the use +of R for chemists.

+ +

Note

+ +

There is a demo for each dataset that can be accessed by + demo(dataset)

+ +

See also

+ +

On CRAN, there is another, more statistically sophisticated package with +similar functionality called drc. I think the advantage of my package +is its user-friendliness.

+ + +

Examples

+
data(antifoul) +r <- drfit(antifoul)
#> +#> TBT: Fitting data...
#> Waiting for profiling to be done...
#> +#> Zn Pyrithion: Fitting data...
#> Waiting for profiling to be done...
format(r,digits=2)
#> Substance ndl n lld lhd mtype logED50 2.5% 97.5% unit sigma a +#> 1 TBT 38 135 -2.7 2.4 probit -0.16 -0.27 -0.056 microM 0.19 -0.16 +#> 2 Zn Pyrithion 27 81 -2.1 2.0 probit -0.40 -0.51 -0.292 microM 0.23 -0.40 +#> b +#> 1 0.68 +#> 2 0.42
drplot(r,antifoul,overlay=TRUE,bw=FALSE)
+
+ +
+ +
+ + +
+

Site built with pkgdown.

+
+ +
+
+ + + diff --git a/docs/reference/drfit.html b/docs/reference/drfit.html new file mode 100644 index 0000000..7acce23 --- /dev/null +++ b/docs/reference/drfit.html @@ -0,0 +1,300 @@ + + + + + + + + +Fit dose-response models — drfit • drfit + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+
+ + + +

Fit dose-response relationships to dose-response data and calculate + biometric results for (eco)toxicity evaluation

+ + +
drfit(data, startlogED50 = NA, chooseone = TRUE, probit = TRUE, logit = FALSE,
+  weibull = FALSE, linlogit = FALSE, level = 0.95, linlogitWrong = NA,
+  allWrong = NA, ps0 = 1, ls0 = 0.5, ws0 = 0.5, b0 = 2, f0 = 0,
+  showED50 = FALSE,
+  EDx = NULL, EDx.tolerance = 1e-4)
+ +

Arguments

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
data

A data frame containing dose-response data. The data frame has to contain + at least a factor called “substance”, a numeric vector “dose” + with the dose values, a vector called “unit” containing the unit + used for the dose and a numeric vector “response” with the response + values of the test system normalized between 0 and 1. Such a data frame can + be easily obtained if a compliant RODBC data source is available for use in + conjunction with the function drdata.

+

If there is a column called “ok” and it is set to “no fit” in + a specific line, then the corresponding data point will be excluded from + the fitting procedure, although it will be plotted.

startlogED50

Especially for the linlogit model, a suitable log10 of the ED50 has to be + given by the user, since it is not correctly estimated for data showing + hormesis with the default estimation method.

probit

A boolean defining if cumulative density curves of normal distributions + pnorm are fitted against the decadic logarithm of the dose. + Default ist TRUE.

logit

A boolean defining if cumulative density curves of logistic distributions + plogis are fitted to the decadic logarithm of the dose. + Default is FALSE.

weibull

A boolean defining if the cumulative density curves of weibull distributions + (pweibull with additionall location parameter and scale=1) + are fitted to the decadic logarithm of the dose. Default is FALSE. + Note that the weibull distribution is fitted here to the log transformed doses + which appears to be an uncommon approach.

linlogit

A boolean defining if the linear-logistic function + linlogitf as defined by van Ewijk and Hoekstra 1993 is + fitted to the data. Default is FALSE.

level

The level for the confidence interval listed for the log ED50.

linlogitWrong

An optional vector containing the names of the substances for which the + linlogit function produces a wrong fit.

allWrong

An optional vector containing the names of the substances for which all + functions produce a wrong fit.

chooseone

If TRUE (default), the models are tried in the order linlogit, probit, + logit, weibull, and the first model that produces a valid fit is used. + If FALSE, all models that are set to TRUE and that can be fitted will be + reported.

ps0

If the probit model is fitted, ps0 gives the possibility to adjust + the starting value for the scale parameter of pnorm.

ls0

If the logit model is fitted, ls0 gives the possibility to adjust + the starting value for the scale parameter of plogis.

ws0

If the weibull model is fitted, ws0 gives the possibility to adjust + the starting value for the shape parameter of pweibull.

b0,f0

If the linearlogistic model is fitted, b0 and f0 give the + possibility to adjust the starting values for the parameters b and f.

showED50

If set to TRUE, the ED50 and its confidence interval on the original dose + scale (not log scale) is included in the output.

EDx

A vector of inhibition values x in percent for which the corresponding doses + EDx should be reported.

EDx.tolerance

Tolerance of the effect level, expressed on the response scale from 0 to 1.

+ +

Value

+ +

A dataframe with the attribute models holding a list of the fitted + dose-response models of class nls. The dataframe has at least + one line for each substance.

+

For the “linlogit”, “logit” and “probit” models, the + parameter a that is reported coincides with the logED50, i.e the + logED50 is one of the model parameters that is being fitted. Therefore, + a confidence interval for the confidence level level is calculated + using the confint.nls function and listed. + + The following variables are in the dataframe:

+
Substance

The name of the substance

+
ndl

The number of dose levels in the raw data

+
n

The total number of data points in the raw data used for the fit

+
lld

The decadic logarithm of the lowest dose

+
lhd

The total number of data points in the raw data used for the fit

+
mtype

If the data did not show a mean response < 0.5 at the highest dose level, + the modeltype is set to “inactive”. If the mean response at the + lowest dose is smaller than 0.5, the modeltype is set to “active”. + In both cases, no fitting procedure is carried out. If the fitted ED50 + is higher than the highest dose, “no fit” is given here.

+
logED50

The decadic logarithm of the ED50

+
low %

The lower bound of the confidence interval of log ED50. + The name of the column depends on the requested confidence level.

+
high %

The higher bound of the confidence interval of log ED50. + The name of the column depends on the requested confidence level.

+
unit

The unit used for the dose levels in the dose-response data

+
sigma

The square root of the estimated variance of the random error as returned + by summary.nls.

+
a

For the “linlogit”, “logit” and “probit” models, the + parameter a coincides with the logED50. In the case of the + “weibull” model, a is a location parameter.

+
b

Parameter b in the case of the “linlogit” fit is the variable + b from the linlogitf function. In the case of “probit” + fit it is the standard deviation of the fitted normal distribution, in the + case of the “logit” fit it is the scale parameter in the + plogis function, and in the “weibull” fit it is the + shape parameter of the fitted pweibull function.

+
c

Only the “linlogit” fit produces a third parameter c which is + the variable f from the linlogitf function.

+ If the parameter showED50 was set to TRUE, the ED50 values and their + confidence intervals are also included on the original dose scale. + + If one or more response leves were specified in the argument EDx, + the corresponding dose levels are given in addition. + + +

Note

+ +

There is a demo for each dataset that can be accessed by + demo(dataset)

+ +

See also

+ +

Further examples are given in help pages to the datasets + antifoul, IM1xIPC81 and + IM1xVibrio. + Since version 0.6.1 of this package, there is a drop-in replacement function + drcfit which internally uses the drc package and also gives + confidence intervals for EDx values via this package.

+ + +

Examples

+
data(antifoul) +r <- drfit(antifoul, showED50 = TRUE, EDx = c(5, 10, 20))
#> +#> TBT: Fitting data...
#> Waiting for profiling to be done...
#> +#> Zn Pyrithion: Fitting data...
#> Waiting for profiling to be done...
format(r, digits = 2)
#> Substance ndl n lld lhd mtype logED50 2.5% 97.5% unit sigma a +#> 1 TBT 38 135 -2.7 2.4 probit -0.16 -0.27 -0.056 microM 0.19 -0.16 +#> 2 Zn Pyrithion 27 81 -2.1 2.0 probit -0.40 -0.51 -0.292 microM 0.23 -0.40 +#> b ED50 ED50 2.5% ED50 97.5% EDx5 EDx10 EDx20 +#> 1 0.68 0.68 0.54 0.88 0.053 0.093 0.18 +#> 2 0.42 0.40 0.31 0.51 0.082 0.117 0.18
+
+ +
+ +
+ + +
+

Site built with pkgdown.

+
+ +
+
+ + + diff --git a/docs/reference/drplot.html b/docs/reference/drplot.html new file mode 100644 index 0000000..eff1338 --- /dev/null +++ b/docs/reference/drplot.html @@ -0,0 +1,268 @@ + + + + + + + + +Plot dose-response models — drplot • drfit + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+
+ + + +

Produce graphics of dose-response data and dose-response relationships + either combined or separately, for one or more substances.

+ + +
drplot(drresults, data, dtype, alpha, ctype, path,
+     fileprefix, overlay, xlim, ylim, xlab, ylab, axes, frame.plot, postscript,
+     pdf, png, bw, pointsize, colors, ltys, pchs, devoff, lpos)
+ +

Arguments

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
drresults

A data frame as returned from drfit.

data

A data frame as returned from drdata. The data frame has to + contain at least a factor called "substance", a vector called "unit" + containing the unit used for the dose, a column "response" with the + response values of the test system normalized between 0 and 1, a column + "dose" with the numeric dose values and a factor called "dosefactor" + containing the dose as a factor.

dtype

A string describing if the raw data should be plotted ("raw"), or an error + bar should be constructed from the standard deviations of the responses at + each dose level ("std", default value) or from the confidence intervals + ("conf"). If you don't want to see the data, set it to "none".

alpha

The confidence level, defaulting to 0.95, only used if dtype "conf" has been + chosen.

ctype

This argument decides if horizontal lines are drawn to show the scatter of + the control values (dose = 0), if there are more than three of them. + Defaults to "none", further allowed values are "std" and "conf" for + displaying the standard deviation of the controls or the confidence + interval for the mean of the controls.

path

The path where graphic files should be put if any are produced. Defaults + to "./" i.e. the current working directory of R.

fileprefix

A string which will form the beginning of each filename, if graphic files + are created. Defaults to "drplot".

overlay

If TRUE, all output will be put into one graph, otherwise a separate graph + will be created for each substance.

xlim

The plot limits (min,max) on the dose axis.

ylim

The plot limits (min,max) on the response axis.

xlab

The axis title for the x axis. Defaults to "Concentration in" unit.

ylab

The axis title for the y axis. Defaults to "Normalized response".

axes

Specifies if axes should be drawn. Default is TRUE, as in + plot.default

frame.plot

Specifies if the plot should be framed. Default is TRUE, as in + plot.default

postscript

If TRUE, (a) postscript graph(s) will be created. Otherwise, and if + the pdf and png arguments are also FALSE, graphics will be + displayed with a screen graphics device.

pdf

If TRUE, (a) pdf graph(s) will be created. Otherwise, and if + the postscript, and png arguments are also FALSE, graphics will be + displayed with a screen graphics device.

png

If TRUE, (a) png graph(s) will be created. Otherwise, and if the + postscript and pdf arguments are also FALSE, graphics will be displayed + with a screen graphics device.

bw

A boolean deciding if the plots will be black and white or not. Default + is TRUE.

pointsize

The pointsize used for pdf, png and postscript graphics.

colors

This is a vector of colors, defaulting to 1:8, used for plotting the data.

ltys

This is a vector of line types for the dose-response models, defaulting to 1:8.

pchs

This is a vector of character types for the data. The default uses built-in + characters 1:n with n being the number of substances for which data are plotted + for overlays, or always 1 when no overlay plot is generated.

lpos

An optional argument defaulting to "topright" specifying the position + of the legend by being passed to the legend function. See the help for the + legend function for all possiblities.

devoff

If set to FALSE, the device will not be closed after creation of an overlay + pdf, png or postscript graph, so texts and other elements can + be added.

+ +

Value

+ +

+
results

You will get plots of data and/or the fitted dose-response curves, on the + screen and/or as postscript/pdf/png files, depending on the parameters.

+ + +

Note

+ +

There is a demo for each dataset that can be accessed by + demo(dataset)

+ + +

Examples

+
data(antifoul) +r <- drfit(antifoul)
#> +#> TBT: Fitting data...
#> Waiting for profiling to be done...
#> +#> Zn Pyrithion: Fitting data...
#> Waiting for profiling to be done...
## Not run: drplot(r,antifoul)
+
+ +
+ +
+ + +
+

Site built with pkgdown.

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

All functions

+

+
+

antifoul

+

Dose-Response data for TBT and Zink Pyrithione in IPC-81 cells

+

checkcontrols

+

Check raw data from range of plates or experiments

+

checkexperiment checkplate

+

Check raw data from a specified experiment or microtiter plate

+

drcfit

+

Fit dose-response models using the drc package

+

drdata

+

Get dose-response data via RODBC

+

drfit-package

+

Dose-response data evaluation

+

drfit

+

Fit dose-response models

+

drplot

+

Plot dose-response models

+

IM1xIPC81

+

Dose-Response data for 1-methyl-3-alkylimidazolium tetrafluoroborates in IPC-81 cells

+

IM1xVibrio

+

Dose-Response data for 1-methyl-3-alkylimidazolium tetrafluoroborates in V. fischeri

+

linlogitf

+

Linear-logistic function

+

pyrithione

+

Cytotoxicity data for different pyrithionates and related species

+

XY

+

Dose-Response data for two substances X and Y

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