Description Usage Arguments Author(s) Examples
This function displays a dose-response curve and data. As a default, the x-axis represents dose levels in log 10 scale and the y-axis represents responses. The black solid line represents a dose-response curve. The blue filled circles represent data points and red triangles represent outliers.
1 2 3 4 |
x |
‘dr4pl’ object whose data and mean response function will be plotted. |
type.curve |
Indicator of the type of a dose-response curve. "all" indicates that data and a curve will be plotted while "data" indicates that only data will be plotted. |
text.title |
Character string for the title of a plot with a default set to "Dose response plot". |
text.x |
Character string for the x-axis of the plot with a default set to "Dose". |
text.y |
Character string for the y-axis of the plot with a default set to "Response". |
indices.outlier |
Pass a vector indicating all indices which are outliers in the data. |
breaks.x |
Vector of desired break points for the x-axis |
breaks.y |
Vector of desired break points for the y-axis |
... |
All arguments that can normally be passed to ggplot. |
Hyowon An, Justin T. Landis and Aubrey G. Bailey
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 | ryegrass.dr4pl <- dr4pl::dr4pl(Response ~ Dose, data = sample_data_1)
plot(ryegrass.dr4pl)
##Able to further edit plots
library(ggplot2)
ryegrass.dr4pl <- dr4pl::dr4pl(Response ~ Dose,
data = sample_data_1,
text.title = "Sample Data Plot")
a <- plot(ryegrass.dr4pl)
a + geom_point(color = "green", size = 5)
##Bring attention to outliers using parameter indices.outlier.
a <- dr4pl(Response ~ Dose,
data = drc_error_3,
method.init = "Mead",
method.robust = "absolute" )
plot(a, indices.outlier = c(90, 101))
##Change the plot title default with parameter text.title
ryegrass.dr4pl <- dr4pl::dr4pl(Response ~ Dose,
data = sample_data_1)
plot(ryegrass.dr4pl, text.title = "My New Dose Response plot")
##Change the labels of the x and y axis to your need
library(drc) #example requires decontaminants dataset from drc package.
d <- subset(decontaminants, group %in% "hpc")
e <- dr4pl(count~conc, data = d)
plot(e,
text.title = "hpc Decontaminants Plot",
text.x = "Concentration",
text.y = "Count")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.