plot_concentrations: Plot concentrations

Description Usage Arguments Value Examples

Description

Plot concentrations

Usage

 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
plot_std_curve(
  df,
  .model,
  .title = NULL,
  .parameter = "FL2.H",
  .concentration = "Concentration",
  .data = NULL
)

plot_target_est_conc(
  df,
  .title = NULL,
  .concentration = "Calc.conc",
  .std_concentration = "Concentration",
  .data = NULL
)

plot_estimate(
  .sample_data,
  .standard_data,
  .model,
  .title = NULL,
  .parameter = "FL2.H",
  .concentration = "Concentration"
)

Arguments

df

A data.frame with the data to be plotted.

.model

An object of class drc with the fitted dose-response model.

.title

A character giving the title of the plot.

.parameter

A character giving the name of the column with the MFI

.concentration

A character giving the name of the column with the with the calculated concentrations.

.data

Deprecated. Use df.

.std_concentration

A character giving the name of the column with the standard concentration.

.sample_data

A data.frame with the calculated sample concentrations.

.standard_data

A data.frame with the calculated standard concentrations.

Value

A ggplot

Examples

 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
library(beadplexr)
library(drc)
data(ryegrass)

ryegrass_m <-
  fit_standard_curve(df = ryegrass,
                     .parameter = "rootl",
                     .concentration = "conc")
recalc_std <-
  calculate_concentration(df = ryegrass,
                          .model = ryegrass_m,
                          .parameter = "rootl")
sample_data <-
  calculate_concentration(df = ryegrass[sample(1:nrow(ryegrass), 5),],
                          .model = ryegrass_m,
                          .parameter = "rootl")

plot_std_curve(ryegrass,
               ryegrass_m,
               .parameter = "rootl",
               .concentration = "conc")

plot_target_est_conc(df = recalc_std,
                     .concentration = "Calc.conc",
                     .std_concentration = "conc")
plot_estimate(
  .sample_data = sample_data,
  .standard_data = ryegrass,
  .model = ryegrass_m,
  .parameter = "rootl",
  .concentration = "conc")

beadplexr documentation built on April 4, 2020, 5:07 p.m.