half_life_2pt: Calculate half-life based on two data points

View source: R/half_life_2pt.R

half_life_2ptR Documentation

Calculate half-life based on two data points

Description

Estimate half-life from two data points. Half-life units are consistent with time units of input. @family rad measurements

Usage

half_life_2pt(time1, time2, N1, N2)

Arguments

time1

First time: Must be numeric with no formatting.

time2

Second time: Must be numeric with no formatting.

N1

First measurement - can be count rate, dose rate, etc.

N2

Second measurement in units consistent with first measurement.

Value

The calculated half-life in units of time input.

Examples

# Between the first two data points in a series of counts
half_life_2pt(time1 = 0, time2 = 1, N1 = 45, N2 = 30)
#
# Between the second and third in the series (same intervals)
half_life_2pt(time1 = 1, time2 = 2, N1 = 30, N2 = 21)
#
# Use on a series
count_times <- 1:5
acts <- 10000 * 2^(-count_times / 10) # activities
acts <- rpois(5, acts) # activities with counting variability applied
half_life_2pt(
  time1 = count_times[1:4], time2 = count_times[2:5],
  N1 = acts[1:4], N2 = acts[2:5]
)

radsafer documentation built on July 26, 2023, 6:03 p.m.