app made independent XL and metadata, functions roxygenized

This commit is contained in:
2026-05-13 15:08:12 +02:00
parent a4bdbe8f8c
commit 1555fe3b6c
2 changed files with 443 additions and 257 deletions
+5 -20
View File
@@ -1,23 +1,8 @@
dat <- data.frame(REF1=c(1.1,1.2,2.1,3,5,6,8.1,9), REF1=c(1.2,1.5,2.1,3.1,4.9,6.1,8.3,9.1),
TEST1=c(1,1.3,2.5,3.5,5.9,6.9,8.1,9.1), TEST2=c(1.4,1.2,2.6,3.4,5.8,6.7,8.6,9.3), log_dose=c(1,0,-1,-2,-3,-4,-5,-6))
all_l <- melt(data.frame(dat), id.vars="log_dose", variable.name="replname", value.name = "readout")
isRef <- rep(c(1,0),1,each=nrow(all_l)/2)
isSample <- rep(c(0,1),1,each=nrow(all_l)/2)
all_l2 <- cbind(all_l, isRef, isSample)
startlistmu <- list(as=1, bs=-1,cs=-3,
ds=10,at=1, bt=-1,
dt=10,r=0)
mu <- gsl_nls(fn = readout ~ as*isRef + at*isSample + (ds*isRef + dt*isSample - as*isRef - at*isSample)/
(1+isRef*exp(bs*(cs - log_dose)) + isSample*exp(bt*(cs-r*isSample-log_dose))),
data=all_l,
start=startlistmu,
control=gsl_nls_control(xtol=1e-6,ftol=1e-6, gtol=1e-6))
s_mu <- summary(mu)$coefficients[,1]
s_mu
################################################################################
# Test file for functions of plateflow
# F. Innerbichler
# 13.5.2026
################################################################################
CIRC <- data.frame(log_dose = c(-2.5,-2.5,-2.5, -3.2,-3.2,-3.2,-3.9,-3.9,-3.9,