half_life_2pt: Calculate half-life based on two data points

Description Usage Arguments Value Examples

View source: R/half_life_2pt.R

Description

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

Usage

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# 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]
)

Example output

[1] 1.709511
[1] 1.943358
[1] 11.535018 10.882809  8.080404 10.111442

radsafer documentation built on April 13, 2021, 1:06 a.m.