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 5 6 |
x |
‘dr4pl’ object whose data and mean response function will be plotted. |
... |
additional ‘dr4pl’ objects to be plotted. Additional dr4pl objects are differentiated by color. |
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 |
Toggles if suspected outliers should be indicated if any. Default argument set to NULL, allowing user to use shape argument. Setting argument to "report" overides shape argument to default "fitted" and any suspected outliers are labeled as "outlier". |
breaks.x |
Vector of desired break points for the x-axis |
breaks.y |
Vector of desired break points for the y-axis |
shape |
Vector name used to group dr4pl objects by shape. Default set to "fitted" and are plotted as circles while suspected outliers are plotted as triangles. Legend for shape does not plot if shape is coerced to default. shape may be faceted |
color.vec |
Character string to indicate color of points. Set to NULL to use default ggplot color pallete |
labels |
Character vector to label names of the colored dr4pl points passed to plot. When faceted by color, use labels. |
Hyowon An, ahwbest@gmail.com
Justin T. Landis, jtlandis314@gmail.com
Aubrey G. Bailey, aubreybailey@gmail.com
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 | ## Not run:
dr4pl.1 <- dr4pl(Response ~ Dose, data = sample_data_1)
plot(dr4pl.1)
## Able to further edit plots.
library(ggplot2) #needed to change color to green
dr4pl.1 <- dr4pl(Response ~ Dose,
data = sample_data_1,
text.title = "Sample Data Plot")
a <- plot(dr4pl.1)
a + geom_point(color = "green", size = 5)
## Bring attention to outliers using parameter indices.outlier.
dr4pl.3 <- dr4pl(Response ~ Dose,
data = drc_error_3,
method.init = "Mead",
method.robust = "absolute")
plot(dr4pl.3, indices.outlier = c(90, 101))
## Change the plot title default with parameter text.title.
dr4pl.1 <- dr4pl::dr4pl(Response ~ Dose,
data = sample_data_1)
plot(dr4pl.1, text.title = "My New Dose Response plot")
##Change the labels of the x and y axis to your need
library(drc) # Needed to load 'decontaminants' data set
data.hpc <- subset(decontaminants, group %in% "hpc")
dr4pl.hpc <- dr4pl(count~conc, data = data.hpc)
plot(dr4pl.hpc,
text.title = "hpc Decontaminants Plot",
text.x = "Concentration",
text.y = "Count")
dr4pl.1 <- dr4pl(Response ~ Dose, data = sample_data_1)
dr4pl.2 <- dr4pl(Response ~ Dose, data = sample_data_2)
plot(dr4pl.1,dr4pl.2)
plot(dr4pl.1,dr4pl.2, labels = c("group1","group2")) + facet_wrap(~labels)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.