Description Usage Arguments Value Examples
Individual data points are plotted as points, then a line average is plotted as function of concentrations. For concentration equal to 0, a circle with a plus is plotted. Concentrations are treated as factors.
1 2 3 |
in.dt |
Input data table. Should contain at least two numeric columns, and one vategorical variable. |
in.xvar |
String with the column name with the concentration. |
in.yvar |
String with the column name with the measurement. |
in.facet |
String with the column name for splitting data across plot facets, e.g. drug name or compound type (CTRL vs compounds) |
in.xlab |
String for the x-axis label |
in.ylab |
String for the y-axis label |
in.group |
String with the column name with grouping for the average line, e.g. drug name. |
ggPlots2 object
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # Dose response of a single compound
dt = data.table(conc = rep(1:10,3), meas = rnorm(30), compound = rep('comp1', 30))
plotDoseResp(dt, in.xvar = 'conc', in.yvar = 'meas', in.group = 'compound', in.facet = 'compound', in.xlab = 'Concnetration (uM)', in.ylab = 'Mean. fl. int.')
# Dose response of a single compound with control
dt = data.table(conc = c(rep(0, 5), rep(1:10, each = 3)), meas = c(rnorm(5, mean = 0, sd = .1), rnorm(30, mean = 2, sd = .1)), compound = c(rep('DMSO', 5), rep('comp1', 30)))
plotDoseResp(dt, in.xvar = 'conc', in.yvar = 'meas', in.group = 'compound', in.facet = 'compound', in.xlab = 'Concnetration (uM)', in.ylab = 'Mean. fl. int.')
# Dose response of two compounds with control; two compounds plotted in the same facet, ctrol in a separate
dt = data.table(conc = c(rep(0, 5), rep(1:10, each = 3), rep(1:10, each = 3)),
meas = c(rnorm(5, mean = 0, sd = .1), rnorm(30, mean = 2, sd = .1), rnorm(30, mean = 1, sd = .1)),
compound = c(rep('DMSO', 5), rep('comp1', 30), rep('comp2', 30)),
type = c(rep('CTRL', 5), rep('compund', 60)))
plotDoseResp(dt, in.xvar = 'conc', in.yvar = 'meas', in.group = 'compound', in.facet = 'type', in.xlab = 'Concnetration (uM)', in.ylab = 'Mean. fl. int.')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.