Description Usage Arguments Value Examples
plot curve from combined fitting
1 2 3 |
x |
- an element of list returned by fitDegNLS or fitSynNLS |
t |
time points (hours) |
leg.vec |
a character vector for legend, the name of the vector should be the same as in x |
curve |
which curve want to draw. If it's not |
tcc |
doubling time of cell lines |
add |
if the plot should be added on top of another plot |
pch |
passed to |
lty |
passed to |
legend |
logical value, whether legend should be generated |
err |
a logical value, whether error bar should be plotted |
main |
the main title of plot |
leg.cex |
the cex of points in legend |
no value to be returned
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | # see \code{fitSynNLS}, \code{fitDegNLS}, \code{fitNLSModels}
# simulating data
tp <- c(0, 1, 2, 4, 8, 16, 32, 64)
ratios <- degCurve(A=0.85, B = 0.1, kd=0.5, tcc=Inf, t = tp) + rnorm(length(tp), sd = 0.05)
#' vector input
r <- fitDegNLS(ratios, t = tp, tcc = Inf)
plotCurve(ratios, tp, tcc = Inf, A = r[["A"]], B = r[["B"]], k = r[["kd"]],
add = FALSE, curve = "deg", err.x = log(2)/r[c("ci025", "ci975")],
err.y = degCurve(A = r[["A"]], B = r[["B"]], kd = r[["kd"]], t = log(2)/ r[["kd"]], tcc = Inf))
#' matrix input, fit a single model
ratio2 <- rbind(p1 = ratios + rnorm(length(ratios), sd = 0.4),
p2 = ratios + rnorm(length(ratios), sd = 0.4))
r.mat <- fitDegNLS(ratio2, t = tp, tcc = Inf)
plotCurve(x = ratio2, t = rep(tp, nrow(ratio2)),
tcc = Inf, A = r.mat[["A"]], B = r.mat[["B"]], k = r.mat[["kd"]],
add = FALSE, curve = "deg", err.x = log(2)/r.mat[c("ci025", "ci975")],
err.y = degCurve(A = r.mat[["A"]], B = r.mat[["B"]], kd = r.mat[["kd"]],
t = log(2)/ r.mat[["kd"]], tcc = Inf))
#' matrix input, fit a single model, in addition, each individual row should also be fitted
r.mat.ind <- fitDegNLS(ratio2, t = tp, tcc = Inf, fitIndividual = TRUE)
plotCurve.comb(x = r.mat.ind, t = tp, tcc = Inf,
leg.vec = c(p1="peptide 1", p2 = "peptide 2"), curve = "deg")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.