Learn R Programming

beadplexr (version 0.5.0)

calculate_concentration: Calculate concentration.

Description

Calculate the concentration in a sample

Usage

calculate_concentration(
  df,
  .model,
  .parameter = "FL2.H",
  .value = "Calc.conc",
  .data = NULL
)

Value

The df with the calculated concentration and error added in two columns.

Arguments

df

A tidy data.frame.

.model

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

.parameter

A character giving the name of column(s) where populations are identified.

.value

A character giving the name of the column to store the calculated concentration

.data

Deprecated. Use df.

Examples

Run this code

library(beadplexr)
library(drc)
data(ryegrass)

ryegrass_m <-
  fit_standard_curve(df = ryegrass,
                     .parameter = "rootl",
                     .concentration = "conc")

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

Run the code above in your browser using DataLab