library(tibble) library(dplyr) library(testthat) devtools::load_all()
enrollRates <- tibble(Stratum = "All", duration = c(2, 10, 4, 4, 8), rate = c(5, 10, 0, 3, 6)) failRates <- tibble(Stratum = "All", duration = 1, failRate = c(.1, .2, .3, .4), hr = c(.9, .75, .8, .6), dropoutRate = .001) x1 <- AHR(enrollRates = enrollRates, failRates = failRates, totalDuration = c(15, 30)) x2 <- AHR_(enrollRates = enrollRates, failRates = failRates, totalDuration = c(15, 30)) expect_equal(x1, x2)
enrollRates <- tibble(Stratum = c(rep("Low", 2), rep("High", 3)), duration = c(2, 10, 4, 4, 8), rate = c(5, 10, 0, 3, 6)) failRates <- tibble(Stratum = c(rep("Low", 2), rep("High", 2)), duration = 1, failRate = c(.1, .2, .3, .4), hr = c(.9, .75, .8, .6), dropoutRate = .001) x1 <- AHR(enrollRates = enrollRates, failRates = failRates, totalDuration = c(15, 30)) x2 <- AHR_(enrollRates = enrollRates, failRates = failRates, totalDuration = c(15, 30)) expect_equal(x1, x2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.