diff options
author | ranke <ranke@d1b72e20-2ee0-0310-a1c4-ad5adbbefcdc> | 2006-08-28 16:11:37 +0000 |
---|---|---|
committer | ranke <ranke@d1b72e20-2ee0-0310-a1c4-ad5adbbefcdc> | 2006-08-28 16:11:37 +0000 |
commit | d311733c45526f6fe6b5459ffc37d2bbb15f6eae (patch) | |
tree | d0af35e694ae59c455316f536e6d7ce0f9423307 | |
parent | 53005a97d56b43a7901f91781145acf30f8bf250 (diff) |
Fixed the line types in drplot. Now we get different lines
for different fits (same substance), and plotting for multiple substances
without overlay as needed for drfit-tox works again.
git-svn-id: http://kriemhild.uft.uni-bremen.de/svn/drfit@86 d1b72e20-2ee0-0310-a1c4-ad5adbbefcdc
-rw-r--r-- | DESCRIPTION | 2 | ||||
-rw-r--r-- | R/drplot.R | 12 |
2 files changed, 9 insertions, 5 deletions
diff --git a/DESCRIPTION b/DESCRIPTION index b78e243..eccc47a 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,5 +1,5 @@ Package: drfit -Version: 0.05-85 +Version: 0.05-86 Date: 2006-08-28 Title: Dose-response data evaluation Author: Johannes Ranke <jranke@uni-bremen.de> @@ -193,23 +193,27 @@ drplot <- function(drresults, data, logED50 <- fits[j,"logED50"] mtype <- as.character(fits[j, "mtype"]) if (mtype == "probit") { - lty <- ltys[nl <- nl + 1] + if (overlay) nl <- nl + 1 else nl = j + lty <- ltys[nl] scale <- fits[j,"b"] plot(function(x) pnorm(-x,-logED50,scale),lld - 0.5, lhd + 2, add=TRUE, col=color, lty=lty) } if (mtype == "logit") { - lty <- ltys[nl <- nl + 1] + if (overlay) nl <- nl + 1 else nl = j + lty <- ltys[nl] scale <- fits[j,"b"] plot(function(x) plogis(-x,-logED50,scale),lld - 0.5, lhd + 2, add=TRUE, col=color, lty=lty) } if (mtype == "weibull") { - lty <- ltys[nl <- nl + 1] + if (overlay) nl <- nl + 1 else nl = j + lty <- ltys[nl] location <- fits[j,"a"] shape <- fits[j,"b"] plot(function(x) pweibull(-x+location,shape),lld - 0.5, lhd + 2, add=TRUE, col=color, lty=lty) } if (mtype == "linlogit") { - lty <- ltys[nl <- nl + 1] + if (overlay) nl <- nl + 1 else nl = j + lty <- ltys[nl] plot(function(x) linlogitf(10^x,1,fits[j,"c"],fits[j,"logED50"],fits[j,"b"]), lld - 0.5, lhd + 2, add=TRUE, col=color, lty=lty) |