From d09233dd6cd6cf60d3b00b30ee59ec148bba3187 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Sat, 15 Sep 2018 20:03:55 +0200 Subject: Static documentation rebuilt by pkgdown::build_site() --- check.log | 72 +++++++++++++------------------------ docs/authors.html | 2 +- docs/index.html | 4 +-- docs/pkgdown.yml | 2 +- docs/reference/IM1xIPC81.html | 8 ++--- docs/reference/IM1xVibrio.html | 8 ++--- docs/reference/XY.html | 8 +---- docs/reference/antifoul.html | 12 ++----- docs/reference/checkcontrols.html | 6 ++-- docs/reference/checkexperiment.html | 7 ++-- docs/reference/checksubstance.html | 7 ++-- docs/reference/drcfit.html | 19 +++++----- docs/reference/drdata.html | 18 +++++----- docs/reference/drfit-package.html | 6 ++-- docs/reference/drfit.html | 17 +++++---- docs/reference/drplot.html | 9 +++-- docs/reference/index.html | 2 +- docs/reference/linlogitf.html | 3 +- docs/reference/pyrithione.html | 4 +-- 19 files changed, 89 insertions(+), 125 deletions(-) diff --git a/check.log b/check.log index cad4fc0..165a11c 100644 --- a/check.log +++ b/check.log @@ -1,15 +1,10 @@ -* using log directory 'C:/Users/johannes/git/drfit/drfit.Rcheck' +* using log directory ‘/home/jranke/git/drfit/drfit.Rcheck’ * using R version 3.5.1 (2018-07-02) -* using platform: i386-w64-mingw32 (32-bit) -* using session charset: ISO8859-1 -* using option '--as-cran' -* checking for file 'drfit/DESCRIPTION' ... OK -* this is package 'drfit' version '0.7.2' +* using platform: x86_64-pc-linux-gnu (64-bit) +* using session charset: UTF-8 +* checking for file ‘drfit/DESCRIPTION’ ... OK +* this is package ‘drfit’ version ‘0.7.2’ * package encoding: UTF-8 -* checking CRAN incoming feasibility ... NOTE -Maintainer: 'Johannes Ranke ' - -The Date field is over a month old. * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK @@ -17,13 +12,12 @@ The Date field is over a month old. * checking for executable files ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK -* checking serialization versions ... OK -* checking whether package 'drfit' can be installed ... OK +* checking for sufficient/correct file permissions ... OK +* checking whether package ‘drfit’ can be installed ... OK * checking installed package size ... OK * checking package directory ... OK * checking DESCRIPTION meta-information ... OK -* checking top-level files ... NOTE -Files 'README.md' or 'NEWS.md' cannot be checked without 'pandoc' being installed. +* checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK @@ -34,7 +28,7 @@ Files 'README.md' or 'NEWS.md' cannot be checked without 'pandoc' being installe * checking whether the package can be unloaded cleanly ... OK * checking whether the namespace can be loaded with stated dependencies ... OK * checking whether the namespace can be unloaded cleanly ... OK -* checking use of S3 registration ... OK +* checking loading without being on the library search path ... OK * checking dependencies in R code ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK @@ -42,49 +36,33 @@ Files 'README.md' or 'NEWS.md' cannot be checked without 'pandoc' being installe * checking R code for possible problems ... OK * checking Rd files ... OK * checking Rd metadata ... OK -* checking Rd line widths ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK -* checking contents of 'data' directory ... OK +* checking contents of ‘data’ directory ... OK * checking data for non-ASCII characters ... OK * checking data for ASCII and uncompressed saves ... OK - WARNING -'qpdf' is needed for checks on size reduction of PDFs -* checking installed files from 'inst/doc' ... OK +* checking sizes of PDF files under ‘inst/doc’ ... OK +* checking installed files from ‘inst/doc’ ... OK * checking examples ... OK -* checking for unstated dependencies in 'tests' ... OK +* checking for unstated dependencies in ‘tests’ ... OK * checking tests ... - Running 'IM1xIPC81.R' - Comparing 'IM1xIPC81.Rout' to 'IM1xIPC81.Rout.save' ... OK - Running 'IM1xVibrio.R' - Comparing 'IM1xVibrio.Rout' to 'IM1xVibrio.Rout.save' ... OK - Running 'XY.R' - Comparing 'XY.Rout' to 'XY.Rout.save' ... OK - Running 'antifoul.R' - Comparing 'antifoul.Rout' to 'antifoul.Rout.save' ... OK - Running 'pyrithione.R' - Comparing 'pyrithione.Rout' to 'pyrithione.Rout.save' ... OK + Running ‘IM1xIPC81.R’ + Comparing ‘IM1xIPC81.Rout’ to ‘IM1xIPC81.Rout.save’ ... OK + Running ‘IM1xVibrio.R’ + Comparing ‘IM1xVibrio.Rout’ to ‘IM1xVibrio.Rout.save’ ... OK + Running ‘XY.R’ + Comparing ‘XY.Rout’ to ‘XY.Rout.save’ ... OK + Running ‘antifoul.R’ + Comparing ‘antifoul.Rout’ to ‘antifoul.Rout.save’ ... OK + Running ‘pyrithione.R’ + Comparing ‘pyrithione.Rout’ to ‘pyrithione.Rout.save’ ... OK OK -* checking PDF version of manual ... WARNING -LaTeX errors when creating PDF version. -This typically indicates Rd problems. -* checking PDF version of manual without hyperrefs or index ... ERROR -Re-running with no redirection of stdout/stderr. -Hmm ... looks like a package -Error in texi2dvi(file = file, pdf = TRUE, clean = clean, quiet = quiet, : - pdflatex is not available -Error in texi2dvi(file = file, pdf = TRUE, clean = clean, quiet = quiet, : - pdflatex is not available -Error in running tools::texi2pdf() -You may want to clean up by 'rm -Rf C:/Users/johannes/AppData/Local/Temp/RtmpAdBCqG/Rd2pdfee0141549db' +* checking PDF version of manual ... OK * DONE -Status: 1 ERROR, 2 WARNINGs, 2 NOTEs -See - 'C:/Users/johannes/git/drfit/drfit.Rcheck/00check.log' -for details. +Status: OK diff --git a/docs/authors.html b/docs/authors.html index 514359f..cb71793 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -58,7 +58,7 @@ drfit - 0.7.1 + 0.7.2 diff --git a/docs/index.html b/docs/index.html index 98afd7d..333c303 100644 --- a/docs/index.html +++ b/docs/index.html @@ -19,7 +19,7 @@ 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. + dose-response data retrieved from a database accessed via 'odbc' are included. As an alternative to the original fitting methods, the algorithms from the 'drc' package can be used."> @@ -40,7 +40,7 @@ drfit - 0.7.1 + 0.7.2 diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index 6e67788..7908647 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -1,4 +1,4 @@ -pandoc: 1.19.2.4 +pandoc: 2.2.1 pkgdown: 1.1.0 pkgdown_sha: ~ articles: [] diff --git a/docs/reference/IM1xIPC81.html b/docs/reference/IM1xIPC81.html index d14afca..3ac5ef7 100644 --- a/docs/reference/IM1xIPC81.html +++ b/docs/reference/IM1xIPC81.html @@ -70,7 +70,7 @@ drfit - 0.7.1 + 0.7.2 @@ -126,7 +126,7 @@

Format

A dataframe containing the data as required for the - drfit function. An additional column contains + drfit function. An additional column contains the tested organism (name of the cell line).

Source

@@ -140,7 +140,7 @@

Examples

-
rIM1xIPC81 <- drfit(IM1xIPC81, linlogit = TRUE, showED50 = TRUE, EDx = 10)
#> +
rIM1xIPC81 <- drfit(IM1xIPC81, linlogit = TRUE, showED50 = TRUE, EDx = 10)
#> #> IM13 BF4: Fitting data...
#> #> IM14 BF4: Fitting data...
#> Warning: NaNs wurden erzeugt
#> #> IM15 BF4: Fitting data...
#> @@ -149,7 +149,7 @@ #> IM18 BF4: Fitting data...
#> Waiting for profiling to be done...
#> Warning: NaNs wurden erzeugt
#> #> IM19 BF4: Fitting data...
#> Waiting for profiling to be done...
#> Warning: NaNs wurden erzeugt
#> #> IM1-10 BF4: Fitting data...
#> Waiting for profiling to be done...
- rIM1xIPC81.drc <- drcfit(IM1xIPC81, linlogit = TRUE, showED50 = TRUE, EDx = 10)
#> + rIM1xIPC81.drc <- drcfit(IM1xIPC81, linlogit = TRUE, showED50 = TRUE, EDx = 10)
#> #> IM13 BF4: Fitting data...
#> #> IM14 BF4: Fitting data...
#> #> IM15 BF4: Fitting data...
#> diff --git a/docs/reference/IM1xVibrio.html b/docs/reference/IM1xVibrio.html index 594efe1..0dde6b0 100644 --- a/docs/reference/IM1xVibrio.html +++ b/docs/reference/IM1xVibrio.html @@ -67,7 +67,7 @@ drfit - 0.7.1 + 0.7.2
@@ -119,7 +119,7 @@

Format

-

A dataframe containing the data as required for the drfit +

A dataframe containing the data as required for the drfit function. Additional columns contain the species tested (luminescent bacteria Vibrio fischeri, organism), and a field specifying if the data is regarded valid (ok).

@@ -133,7 +133,7 @@

Examples

-
rIM1xVibrio <- drfit(IM1xVibrio, logit = TRUE, chooseone = FALSE, +
rIM1xVibrio <- drfit(IM1xVibrio, logit = TRUE, chooseone = FALSE, showED50 = TRUE, EDx = c(10, 20))
#> #> IM13 BF4: Fitting data...
#> Waiting for profiling to be done...
#> Waiting for profiling to be done...
#> #> IM14 BF4: Fitting data...
#> Waiting for profiling to be done...
#> Waiting for profiling to be done...
#> @@ -176,7 +176,7 @@ #> 14 0.7172 0.4132 5.2141 4.6652 5.801e+00 6.446e-01 1.394 #> 15 -0.1790 0.8019 0.6622 0.5534 7.876e-01 6.212e-02 0.140 #> 16 -0.1831 0.4816 0.6560 0.5470 7.843e-01 5.738e-02 0.141
- rIM1xVibrio.drc <- drcfit(IM1xVibrio, logit = TRUE, chooseone = FALSE, + rIM1xVibrio.drc <- drcfit(IM1xVibrio, logit = TRUE, chooseone = FALSE, showED50 = TRUE, EDx = c(10, 20))
#> #> IM13 BF4: Fitting data...
#> #> IM14 BF4: Fitting data...
#> diff --git a/docs/reference/XY.html b/docs/reference/XY.html index 2af3026..53770a3 100644 --- a/docs/reference/XY.html +++ b/docs/reference/XY.html @@ -62,7 +62,7 @@ drfit - 0.7.1 + 0.7.2
@@ -112,10 +112,6 @@

A dataframe containing dose (concentration) and response data, as well as control values where the dose is zero.

-

Source

- -

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

-

Examples

# NOT RUN { @@ -127,8 +123,6 @@ diff --git a/docs/reference/antifoul.html b/docs/reference/antifoul.html index d166ebd..7ea336a 100644 --- a/docs/reference/antifoul.html +++ b/docs/reference/antifoul.html @@ -64,7 +64,7 @@ drfit - 0.7.1 + 0.7.2
@@ -117,13 +117,9 @@ 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, +
rantifoul.ED50 <- drfit(antifoul, linlogit = TRUE, logit = TRUE, weibull = TRUE, chooseone = FALSE, showED50 = TRUE, EDx = c(10))
#> @@ -155,7 +151,7 @@ #> 6 0.116872 #> 7 0.110068 #> 8 0.121166
-rantifoul.drc <- drcfit(antifoul, +rantifoul.drc <- drcfit(antifoul, linlogit = TRUE, logit = TRUE, weibull = TRUE, chooseone = FALSE, showED50 = TRUE, EDx = c(10))
#> @@ -193,8 +189,6 @@ diff --git a/docs/reference/checkcontrols.html b/docs/reference/checkcontrols.html index d3e4314..30baaed 100644 --- a/docs/reference/checkcontrols.html +++ b/docs/reference/checkcontrols.html @@ -62,7 +62,7 @@ drfit - 0.7.1 + 0.7.2
@@ -105,7 +105,8 @@
-
checkcontrols(last = 10, id = NULL, db = "cytotox",
+    
checkcontrols(last = 10, id = NULL,
+                db = c("cytotox", "enzymes", "ecotox"),
                 celltype = "IPC-81", enzymetype = "AChE",
                 organism = "Vibrio fischeri",
                 endpoint = "%", qcc = c("R", "xbar"))
@@ -180,7 +181,6 @@ Johannes Ranke jranke@uni-bremen.de - http://www.uft.uni-bremen.de/chemie/ranke
diff --git a/docs/reference/checkexperiment.html b/docs/reference/checkexperiment.html index 0712cd4..937b8dc 100644 --- a/docs/reference/checkexperiment.html +++ b/docs/reference/checkexperiment.html @@ -62,7 +62,7 @@ drfit - 0.7.1 + 0.7.2 @@ -105,8 +105,8 @@ -
checkplate(id, db = "cytotox")
-  checkexperiment(id, db = "ecotox", endpoint = "%")
+
checkplate(id, db = c("cytotox", "enzymes"))
+  checkexperiment(id, db = c("ecotox", "cytotox", "enzymes"), endpoint = "%")

Arguments

@@ -153,7 +153,6 @@ Johannes Ranke jranke@uni-bremen.de - http://www.uft.uni-bremen.de/chemie/ranke diff --git a/docs/reference/checksubstance.html b/docs/reference/checksubstance.html index 3f07df2..9f5899c 100644 --- a/docs/reference/checksubstance.html +++ b/docs/reference/checksubstance.html @@ -62,7 +62,7 @@ drfit - 0.7.1 + 0.7.2 @@ -105,7 +105,9 @@ -
checksubstance(substance, db = "cytotox", experimentator = "%",
+    
checksubstance(substance,
+    db = c("cytotox", "enzymes", "ecotox"),
+    experimentator = "%",
     celltype = "%", enzymetype = "%", organism = "%",
     endpoint = "%",
     whereClause = "1", ok = "%")
@@ -187,7 +189,6 @@ Johannes Ranke jranke@uni-bremen.de - http://www.uft.uni-bremen.de/chemie/ranke diff --git a/docs/reference/drcfit.html b/docs/reference/drcfit.html index d08b4b0..b4c299b 100644 --- a/docs/reference/drcfit.html +++ b/docs/reference/drcfit.html @@ -62,7 +62,7 @@ drfit - 0.7.1 + 0.7.2 @@ -120,7 +120,7 @@ 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.

+ 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.

@@ -130,7 +130,7 @@
@@ -139,7 +139,7 @@ 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 + ones used in drfit. Parameter e from LL.2 is listed as a here, and parameter b from LL.2 is listed as b.

@@ -147,12 +147,12 @@ + drfit, due to a different model specification.

@@ -212,7 +212,7 @@ 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.

+ 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 @@ -231,8 +231,8 @@

See also

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

+ antifoul, IM1xIPC81 and + IM1xVibrio.

Examples

@@ -266,7 +266,6 @@

Author

Johannes Ranke jranke@uni-bremen.de - http://www.uft.uni-bremen.de/chemie/ranke The functionality of the drc package used under the hood in this function was written by Christian Ritz. diff --git a/docs/reference/drdata.html b/docs/reference/drdata.html index fc962be..438f32c 100644 --- a/docs/reference/drdata.html +++ b/docs/reference/drdata.html @@ -61,7 +61,7 @@ drfit - 0.7.1 + 0.7.2 @@ -103,8 +103,9 @@ -
drdata(substances, experimentator = "%", db = "cytotox", celltype = "IPC-81",
-    enzymetype="AChE", organism="Vibrio fischeri", endpoint="Luminescence",
+    
drdata(substances, experimentator = "%", db = "cytotox",
+    celltype = "IPC-81", enzymetype = "AChE", organism = "Vibrio fischeri",
+    endpoint = "Luminescence",
     whereClause = "1", ok = "'ok','no fit'")

Arguments

@@ -201,10 +202,12 @@

Examples

-
# Get cytotoxicity data for Tributyltin and zinc pyrithione, tested with IPC-81 -# cells -
# NOT RUN { -drdata(c("TBT","ZnPT2")) +
# NOT RUN { + # Get cytotoxicity data for Tributyltin and zinc pyrithione, tested with IPC-81 + # cells + drdata(c("TBT", "ZnPT2")) + + # }
diff --git a/docs/reference/drfit-package.html b/docs/reference/drfit-package.html index d2aa326..270cf91 100644 --- a/docs/reference/drfit-package.html +++ b/docs/reference/drfit-package.html @@ -61,7 +61,7 @@ drfit - 0.7.1 + 0.7.2 @@ -124,14 +124,14 @@ is its user-friendliness.

Examples

data(antifoul) -r <- drfit(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)
+#> 2 0.42
drplot(r,antifoul,overlay=TRUE,bw=FALSE)
@@ -122,7 +122,7 @@ 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.

+ 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.

@@ -156,7 +156,7 @@
@@ -249,13 +249,13 @@ 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” + 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.

+ 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. @@ -271,10 +271,10 @@

See also

Further examples are given in help pages to the datasets - antifoul, IM1xIPC81 and - IM1xVibrio. + 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 + drcfit which internally uses the drc package and also gives confidence intervals for EDx values via this package.

@@ -307,7 +307,6 @@ Johannes Ranke jranke@uni-bremen.de - http://www.uft.uni-bremen.de/chemie/ranke diff --git a/docs/reference/drplot.html b/docs/reference/drplot.html index e5cbb22..24d69a8 100644 --- a/docs/reference/drplot.html +++ b/docs/reference/drplot.html @@ -62,7 +62,7 @@ drfit - 0.7.1 + 0.7.2 @@ -114,11 +114,11 @@ - + -

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 + ones used in drfit. Parameter e from LN.2 is listed as a here, and parameter b from there is listed as b.

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 + 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.

linlogit

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

drresults

A data frame as returned from drfit.

A data frame as returned from drfit.

data

A data frame as returned from drdata. The data frame has to +

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 @@ -256,7 +256,7 @@

Examples

data(antifoul) -r <- drfit(antifoul)
#> +r <- drfit(antifoul)
#> #> TBT: Fitting data...
#> Waiting for profiling to be done...
#> #> Zn Pyrithion: Fitting data...
#> Waiting for profiling to be done...
drplot(r,antifoul)
@@ -276,7 +276,6 @@ Johannes Ranke jranke@uni-bremen.de - http://www.uft.uni-bremen.de/chemie/ranke diff --git a/docs/reference/index.html b/docs/reference/index.html index 2b1f884..b05e223 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -58,7 +58,7 @@ drfit - 0.7.1 + 0.7.2 diff --git a/docs/reference/linlogitf.html b/docs/reference/linlogitf.html index 1dddf50..ba854f0 100644 --- a/docs/reference/linlogitf.html +++ b/docs/reference/linlogitf.html @@ -62,7 +62,7 @@ drfit - 0.7.1 + 0.7.2 @@ -157,7 +157,6 @@ Johannes Ranke jranke@uni-bremen.de - http://www.uft.uni-bremen.de/chemie/ranke diff --git a/docs/reference/pyrithione.html b/docs/reference/pyrithione.html index 1488ecb..4e608d3 100644 --- a/docs/reference/pyrithione.html +++ b/docs/reference/pyrithione.html @@ -63,7 +63,7 @@ drfit - 0.7.1 + 0.7.2 @@ -111,7 +111,7 @@

Format

-

A dataframe containing the data as required for the drfit +

A dataframe containing the data as required for the drfit function.

Source

-- cgit v1.2.1