aboutsummaryrefslogtreecommitdiff
path: root/R/drfit.R
diff options
context:
space:
mode:
Diffstat (limited to 'R/drfit.R')
-rw-r--r--R/drfit.R13
1 files changed, 6 insertions, 7 deletions
diff --git a/R/drfit.R b/R/drfit.R
index c3fc945..a3b8a1b 100644
--- a/R/drfit.R
+++ b/R/drfit.R
@@ -23,13 +23,12 @@ drdata <- function(substances, experimentator = "%", db = "cytotox",
drfit <- function(data, startlogEC50 = NA, lognorm = TRUE, logis = FALSE,
linearlogis = FALSE, b0 = 2, f0 = 0)
{
- library(nls)
- substances <- levels(data$substance)
- unit <- levels(as.factor(data$unit))
- logisf <- function(x,x0,b,k=1)
- {
- k / (1 + (x/x0)^b)
- }
+ substances <- levels(data$substance)
+ unit <- levels(as.factor(data$unit))
+ logisf <- function(x,x0,b,k=1)
+ {
+ k / (1 + (x/x0)^b)
+ }
linearlogisf <- function(x,k,f,mu,b)
{
k*(1 + f*x) / (1 + ((2*f*(10^mu) + 1) * ((x/(10^mu))^b)))

Contact - Imprint