create_error_df_redox_multiple: Creates an error df at multiple inaccuracies, with multiple...

Description Usage Arguments Value Examples

View source: R/utils.R

Description

Creates an error df at multiple inaccuracies, with multiple Rmin/Rmax/delta/e0 parameters

Usage

1
2
3
4
5
6
7
8
create_error_df_redox_multiple(
  inaccuracies,
  Emin,
  Emax,
  param_df,
  temp = 295.15,
  by = 0.01
)

Arguments

inaccuracies

A vector of inaccuracies (e.g. 0.02 for 2% error), always relative

Emin

The minimum redox potential, in mV, for which to record error

Emax

The maximum redox potential, in mV, for which to record error

param_df

A dataframe containing a list of sensor parameters, with these columns: 'name': An identifier for this sensor 'Rmin': the minimum possible ratiometric fluorescence for this sensor 'Rmax': the maximum possible ratiometric fluorescence for this sensor 'delta': the ratiometric fluorescence in the first wavelength for this sensor 'e0': this sensor's midpoint potential

temp

(optional, default: 295.15) the temperature (in Kelvin) at which measurements were made

by

(optional, default: 0.01) The granularity of the error tableā€“e.g., by = 0.01 would record 275 and 275.01, etc.

Value

A dataframe of errors with columns: 'Name': this sensor name 'E': the redox potential (mV), 'Rmin': the minimum possible ratiometric fluorescence for this sensor 'Rmax': the maximum possible ratiometric fluorescence for this sensor 'Error': the error in this redox potential (mV) 'Inaccuracy': The inaccuracy of the measurements (relative to R).

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
create_error_df_redox_multiple(
  c(0.01, 0.02), -300, -200,
  data.frame(
    "Rmin" = c(1, 2),
    "Rmax" = c(5, 6),
    "delta" = c(0.2, 1.2),
    "name" = c("normal", "plusOne"),
    "e0" = c(-275, -274)
  )
)

julianstanley/SensorOverlord documentation built on Oct. 19, 2020, 2:29 p.m.