# Input values are numeric vectors representing dPCR experiments
x1 <- rpois(765, 1.1)
x2 <- rpois(765, 1.1)
test_ratio(x1, x2)
# Input values represent only number of positive partitions and total
# partitions
x3 <- sum(rpois(765, 1.1) > 0)
x4 <- sum(rpois(765, 1.1) > 0)
test_ratio(c(x3, 765), c(x4, 765))
# It is possible to mix different types of input as long as they have
# the same class
test_ratio(c(x3, 765), x1)
# The same is true for adpcr and dpcr objects.
x5 <- sim_adpcr(400, 1600, 100, pos_sums = TRUE, n_panels = 1)
x6 <- sim_adpcr(400, 1600, 100, pos_sums = FALSE, n_panels = 1)
test_ratio(x5, x6)
x7 <- sim_ddpcr(400, 1600, 100, pos_sums = TRUE, n_exp = 1)
x8 <- sim_ddpcr(400, 1600, 100, pos_sums = FALSE, n_exp = 1)
test_ratio(x7, x8)
Run the code above in your browser using DataLab