diff options
Diffstat (limited to 'R/drfit.R')
-rw-r--r-- | R/drfit.R | 13 |
1 files changed, 6 insertions, 7 deletions
@@ -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)))
|