ranges_df-pHSensor-method: Finds the ranges df of this pH sensor at given inaccuracies

Description Usage Arguments Value Examples

Description

Adding this method on 31 May 2020, hoping this style will depreciate getErrorTable in the future.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## S4 method for signature 'pHSensor'
ranges_df(
  object,
  inaccuracies = c(0.02),
  pHmin = 1,
  pHmax = 14,
  by = 0.001,
  name = "Sensor",
  thresholds = c(0.01, 0.05, 0.1, 0.15, 0.2)
)

Arguments

object

A pHSensor object

inaccuracies

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

pHmin

(optional, default: 1) The minimum pH for which to record error

pHmax

(optional, default: 14) The maximum pH for which to record error

by

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

name

(optional, default: "Sensor") A name for this sensor

thresholds

A vector of error thresholds (e.g. c(0.5, 1) for 0.5 and 1)

Value

A dataframe of suited ranges with these columns: 'Sensor_Name': the name of the sensor 'Minimum': the minimum pH measurable at the given inaccuracy 'Maximum': the maximum pH measurable at the given inaccuracy 'Inaccuracy': the inaccuracy associated with this row (relative) 'error_thresh': the error threshold associated with this row

Examples

1
2
my_sensor <- new("pHSensor", new("Sensor", Rmin = 1, Rmax = 5, delta = 0.2), pKa = 7)
ranges_df(my_sensor)

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