Skip to contents

Calculate dilution from known concentrations

Usage

dilute(c1, c2 = min(c1), v2, round_for_pipettes = TRUE)

Arguments

c1

Numeric. Initial concentration of sample.

c2

Numeric. Target concentration of sample.

v2

Numeric. Target final volume of sample. If round_for_pipettes = TRUE, assumes volume is uL.

round_for_pipettes

Logical. If TRUE, rounds values to the accuracy of standard pipettes using make_pipette_vol.

Value

a data.frame, with sample_to_add as the volume of sample to add, and add_to as the volume to dilute the sample into.

Examples

dilute(203, 70, 10)
#>   sample_to_add add_to
#> 1          3.45   6.55
dilute(203, 70, 10, round_for_pipettes = FALSE)
#>   sample_to_add   add_to
#> 1      3.448276 6.551724
# Vectorized:
dilute(c(8, 10, 12), c(4, 5, 6), c(7, 8, 9))
#>   sample_to_add add_to
#> 1           3.5    3.5
#> 2           4.0    4.0
#> 3           4.5    4.5