aboutsummaryrefslogtreecommitdiff
path: root/chm/drplot.html
blob: 84cf12e89e38b4ca578b642ded9678bfc1ebc2a7 (plain) (blame)
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
<html><head><title>Plot dose-response models</title>
<link rel="stylesheet" type="text/css" href="Rchm.css">
</head>
<body>

<table width="100%"><tr><td>drplot(drfit)</td><td align="right">R Documentation</td></tr></table><object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
<param name="keyword" value="R:   drplot">
<param name="keyword" value=" Plot dose-response models">
</object>


<h2>Plot dose-response models</h2>


<h3>Description</h3>

<p>
Produce graphics of dose-response data and dose-response relationships 
either combined or separately, for one or more substances.
</p>


<h3>Usage</h3>

<pre>
  drplot(drresults, data, dtype, alpha, path, fileprefix, overlay,
    postscript, color, datacolors, fitcolors)
</pre>


<h3>Arguments</h3>

<table summary="R argblock">
<tr valign="top"><td><code>drresults</code></td>
<td>
A data frame as returned from <code><a href="drfit.html">drfit</a></code>.
</td></tr>
<tr valign="top"><td><code>data</code></td>
<td>
A data frame as returned from <code><a href="drdata.html">drdata</a></code>.  If data is to be
plotted, the data frame has to contain at least a factor called
"substance", a vector called "unit" containing the unit used for the dose,
a column "response" with the response values of the test system normalized
between 0 and 1, a column "dose" with the numeric dose values and a factor
called "dosefactor" containing the dose as a factor. If plotting of the data is 
not required, data can be set to FALSE.
</td></tr>
<tr valign="top"><td><code>dtype</code></td>
<td>
A string describing if the raw data should be plotted ("raw"), or 
an error bar should be constructed from the standard deviations of the
responses at each dose level ("std", default value) or from the confidence
intervals ("conf"). Of course, dtype only makes a difference, if a valid data
object has been referenced.
</td></tr>
<tr valign="top"><td><code>alpha</code></td>
<td>
The confidence level, defaulting to 0.95, only used if dtype "conf" has been
chosen.
</td></tr>
<tr valign="top"><td><code>path</code></td>
<td>
The path where graphic files should be put if any are produced. Defaults
to "./" i.e. the current working directory of R.
</td></tr>
<tr valign="top"><td><code>fileprefix</code></td>
<td>
A string which will form the beginning of each filename, if graphic files are 
created. Defaults to "drplot".
</td></tr>
<tr valign="top"><td><code>overlay</code></td>
<td>
If TRUE, all output will be put into one graph, otherwise a separate graph
will be created for each substance. In the latter case, on-screen display
(postscript=FALSE) only works correctly for data plots. Dose-response models
will all be put into the last graph in this case.
</td></tr>
<tr valign="top"><td><code>postscript</code></td>
<td>
If TRUE, (a) postscript graph(s) will be created. Otherwise, graphics will be
displayed with a screen graphics device.
</td></tr>
<tr valign="top"><td><code>color</code></td>
<td>
If TRUE, a sensible selection of colors will be attempted. If false, everything
will be drawn in black
</td></tr>
<tr valign="top"><td><code>datacolors</code></td>
<td>
This is a vector of colors, defaulting to 1:8, used for plotting the data.
</td></tr>
<tr valign="top"><td><code>fitcolors</code></td>
<td>
Here you can specify a palette for the colors of the dose-response fits. The 
default value is "default", which produces the default palette, if the 
number of fits to be plotted is 8 or less. Otherwise, rainbow colors 
will be plotted. Unless there is more than one fit per substance to be plotted,
or the number of fits is larger than 8, the fitcolors will match the
datacolors.
</td></tr>
</table>

<h3>Value</h3>

<table summary="R argblock">
<tr valign="top"><td><code>results</code></td>
<td>
You will get plots of data and/or the fitted dose-response curves, on the
screen and/or as postscript files, depending on the parameters.
</td></tr>
</table>

<h3>Note</h3>

<p>
Turn off the colors if you don't like them and don't want to fiddle with
them. Treatment of legends is quite bad. Be sure all devices are closed
(e.g. by calling <code>dev.off()</code>) before calling <code>drplot</code> again.
</p>


<h3>Author(s)</h3>

<p>
Johannes Ranke 
<a href="mailto:jranke@uni-bremen.de">jranke@uni-bremen.de</a> 
<a href="http://www.uft.uni-bremen.de/chemie/ranke">http://www.uft.uni-bremen.de/chemie/ranke</a>
</p>


<h3>Examples</h3>

<pre>
data(antifoul)
r &lt;- drfit(antifoul)
## Not run: drplot(r,antifoul)
</pre>



<hr><div align="center"><a href="00Index.html">[Package Contents]</a></div>

</body></html>

Contact - Imprint