Running ‘testthat.R’ [2s/4s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(SimRVPedigree)
  > 
  > test_check("SimRVPedigree")
  ── 1. Error: (unknown) (@test_ascertain_ped.R#3)  ──────────────────────────────
  replacement has 1 row, data has 0
  1: sim_RVped(hazard_rates = hazard(AgeSpecific_Hazards), GRR = 35, carrier_prob = 0.002, 
         RVfounder = TRUE, FamID = 1, num_affected = 2, recall_probs = c(1), founder_byears = c(1900, 
             1910), ascertain_span = c(1970, 2015)) at testthat/test_ascertain_ped.R:3
  2: sim_ped(hazard_rates, GRR, FamID, founder_byears, stop_year, carrier_prob, RVfounder, 
         NB_params, fert)
  3: `[<-`(`*tmp*`, 1, , value = structure(list(FamID = 1, ID = 1, sex = 0, dadID = NA, 
         momID = NA, affected = FALSE, DA1 = 0, DA2 = 1, birthYr = 1905, onsetYr = NA, 
         deathYr = NA, RR = 35, available = TRUE, Gen = 1, do_sim = TRUE), class = "data.frame", row.names = c(NA, 
     -1L)))
  4: `[<-.data.frame`(`*tmp*`, 1, , value = structure(list(FamID = 1, ID = 1, sex = 0, 
         dadID = NA, momID = NA, affected = FALSE, DA1 = 0, DA2 = 1, birthYr = 1905, onsetYr = NA, 
         deathYr = NA, RR = 35, available = TRUE, Gen = 1, do_sim = TRUE), class = "data.frame", row.names = c(NA, 
     -1L)))
  5: xpdrows.data.frame(x, rows, new.rows)
  6: `[[<-`(`*tmp*`, i, value = NA_real_)
  7: `[[<-.data.frame`(`*tmp*`, i, value = NA_real_)
  8: stop(sprintf(ngettext(N, "replacement has %d row, data has %d", "replacement has %d rows, data has %d"), 
         N, nrows), domain = NA)
  
  ── 2. Error: returns a ped with the correct generations (@test_assign_gen.R#4)  
  replacement has 1 row, data has 0
  1: sim_RVped(hazard_rates = hazard(AgeSpecific_Hazards), GRR = 50, carrier_prob = 0.002, 
         RVfounder = TRUE, FamID = 1, num_affected = 2, recall_probs = c(1), founder_byears = c(1900, 
             1910), ascertain_span = c(1900, 2017)) at testthat/test_assign_gen.R:4
  2: sim_ped(hazard_rates, GRR, FamID, founder_byears, stop_year, carrier_prob, RVfounder, 
         NB_params, fert)
  3: `[<-`(`*tmp*`, 1, , value = structure(list(FamID = 1, ID = 1, sex = 0, dadID = NA, 
         momID = NA, affected = FALSE, DA1 = 0, DA2 = 1, birthYr = 1903, onsetYr = NA, 
         deathYr = NA, RR = 50, available = TRUE, Gen = 1, do_sim = TRUE), class = "data.frame", row.names = c(NA, 
     -1L)))
  4: `[<-.data.frame`(`*tmp*`, 1, , value = structure(list(FamID = 1, ID = 1, sex = 0, 
         dadID = NA, momID = NA, affected = FALSE, DA1 = 0, DA2 = 1, birthYr = 1903, onsetYr = NA, 
         deathYr = NA, RR = 50, available = TRUE, Gen = 1, do_sim = TRUE), class = "data.frame", row.names = c(NA, 
     -1L)))
  5: xpdrows.data.frame(x, rows, new.rows)
  6: `[[<-`(`*tmp*`, i, value = NA_real_)
  7: `[[<-.data.frame`(`*tmp*`, i, value = NA_real_)
  8: stop(sprintf(ngettext(N, "replacement has %d row, data has %d", "replacement has %d rows, data has %d"), 
         N, nrows), domain = NA)
  
  ── 3. Error: censor_ped returns an error when expected (@test_censor_ped.R#3)  ─
  replacement has 1 row, data has 0
  1: sim_RVped(hazard_rates = hazard(AgeSpecific_Hazards), GRR = 50, carrier_prob = 0.002, 
         RVfounder = TRUE, FamID = 1, num_affected = 2, recall_probs = c(1, 1, 1, 0.5, 
             0.25), founder_byears = c(1900, 1980), ascertain_span = c(1980, 2015)) at testthat/test_censor_ped.R:3
  2: sim_ped(hazard_rates, GRR, FamID, founder_byears, stop_year, carrier_prob, RVfounder, 
         NB_params, fert)
  3: `[<-`(`*tmp*`, 1, , value = structure(list(FamID = 1, ID = 1, sex = 1, dadID = NA, 
         momID = NA, affected = FALSE, DA1 = 0, DA2 = 1, birthYr = 1962, onsetYr = NA, 
         deathYr = NA, RR = 50, available = TRUE, Gen = 1, do_sim = TRUE), class = "data.frame", row.names = c(NA, 
     -1L)))
  4: `[<-.data.frame`(`*tmp*`, 1, , value = structure(list(FamID = 1, ID = 1, sex = 1, 
         dadID = NA, momID = NA, affected = FALSE, DA1 = 0, DA2 = 1, birthYr = 1962, onsetYr = NA, 
         deathYr = NA, RR = 50, available = TRUE, Gen = 1, do_sim = TRUE), class = "data.frame", row.names = c(NA, 
     -1L)))
  5: xpdrows.data.frame(x, rows, new.rows)
  6: `[[<-`(`*tmp*`, i, value = NA_real_)
  7: `[[<-.data.frame`(`*tmp*`, i, value = NA_real_)
  8: stop(sprintf(ngettext(N, "replacement has %d row, data has %d", "replacement has %d rows, data has %d"), 
         N, nrows), domain = NA)
  
  ── 4. Error: censor_ped returns a smaller or equally sized ped (@test_censor_ped
  replacement has 1 row, data has 0
  1: sim_RVped(hazard_rates = hazard(AgeSpecific_Hazards), GRR = 50, carrier_prob = 0.002, 
         RVfounder = TRUE, FamID = 1, num_affected = 2, recall_probs = c(1, 1, 1, 0.5, 
             0.25), founder_byears = c(1900, 1980), ascertain_span = c(1980, 2015)) at testthat/test_censor_ped.R:30
  2: sim_ped(hazard_rates, GRR, FamID, founder_byears, stop_year, carrier_prob, RVfounder, 
         NB_params, fert)
  3: `[<-`(`*tmp*`, 1, , value = structure(list(FamID = 1, ID = 1, sex = 0, dadID = NA, 
         momID = NA, affected = FALSE, DA1 = 0, DA2 = 1, birthYr = 1975, onsetYr = NA, 
         deathYr = NA, RR = 50, available = TRUE, Gen = 1, do_sim = TRUE), class = "data.frame", row.names = c(NA, 
     -1L)))
  4: `[<-.data.frame`(`*tmp*`, 1, , value = structure(list(FamID = 1, ID = 1, sex = 0, 
         dadID = NA, momID = NA, affected = FALSE, DA1 = 0, DA2 = 1, birthYr = 1975, onsetYr = NA, 
         deathYr = NA, RR = 50, available = TRUE, Gen = 1, do_sim = TRUE), class = "data.frame", row.names = c(NA, 
     -1L)))
  5: xpdrows.data.frame(x, rows, new.rows)
  6: `[[<-`(`*tmp*`, i, value = NA_real_)
  7: `[[<-.data.frame`(`*tmp*`, i, value = NA_real_)
  8: stop(sprintf(ngettext(N, "replacement has %d row, data has %d", "replacement has %d rows, data has %d"), 
         N, nrows), domain = NA)
  
  ── 5. Error: censor_ped does not return any info after the censor year (@test_ce
  replacement has 1 row, data has 0
  1: sim_RVped(hazard_rates = hazard(AgeSpecific_Hazards), GRR = 50, carrier_prob = 0.002, 
         RVfounder = TRUE, FamID = 1, num_affected = 2, recall_probs = c(1, 1, 1, 0.5, 
             0.25), founder_byears = c(1900, 1980), ascertain_span = c(1980, 2015)) at testthat/test_censor_ped.R:43
  2: sim_ped(hazard_rates, GRR, FamID, founder_byears, stop_year, carrier_prob, RVfounder, 
         NB_params, fert)
  3: `[<-`(`*tmp*`, 1, , value = structure(list(FamID = 1, ID = 1, sex = 0, dadID = NA, 
         momID = NA, affected = FALSE, DA1 = 1, DA2 = 0, birthYr = 1923, onsetYr = NA, 
         deathYr = NA, RR = 50, available = TRUE, Gen = 1, do_sim = TRUE), class = "data.frame", row.names = c(NA, 
     -1L)))
  4: `[<-.data.frame`(`*tmp*`, 1, , value = structure(list(FamID = 1, ID = 1, sex = 0, 
         dadID = NA, momID = NA, affected = FALSE, DA1 = 1, DA2 = 0, birthYr = 1923, onsetYr = NA, 
         deathYr = NA, RR = 50, available = TRUE, Gen = 1, do_sim = TRUE), class = "data.frame", row.names = c(NA, 
     -1L)))
  5: xpdrows.data.frame(x, rows, new.rows)
  6: `[[<-`(`*tmp*`, i, value = NA_real_)
  7: `[[<-.data.frame`(`*tmp*`, i, value = NA_real_)
  8: stop(sprintf(ngettext(N, "replacement has %d row, data has %d", "replacement has %d rows, data has %d"), 
         N, nrows), domain = NA)
  
  ── 6. Error: censor_ped issues a warnign if birthYr data missing (@test_censor_p
  replacement has 1 row, data has 0
  1: sim_RVped(hazard_rates = hazard(AgeSpecific_Hazards), GRR = 50, carrier_prob = 0.002, 
         RVfounder = TRUE, FamID = 1, num_affected = 2, recall_probs = c(1, 1, 1, 0.5, 
             0.25), founder_byears = c(1900, 1980), ascertain_span = c(1980, 2015)) at testthat/test_censor_ped.R:62
  2: sim_ped(hazard_rates, GRR, FamID, founder_byears, stop_year, carrier_prob, RVfounder, 
         NB_params, fert)
  3: `[<-`(`*tmp*`, 1, , value = structure(list(FamID = 1, ID = 1, sex = 0, dadID = NA, 
         momID = NA, affected = FALSE, DA1 = 0, DA2 = 1, birthYr = 1919, onsetYr = NA, 
         deathYr = NA, RR = 50, available = TRUE, Gen = 1, do_sim = TRUE), class = "data.frame", row.names = c(NA, 
     -1L)))
  4: `[<-.data.frame`(`*tmp*`, 1, , value = structure(list(FamID = 1, ID = 1, sex = 0, 
         dadID = NA, momID = NA, affected = FALSE, DA1 = 0, DA2 = 1, birthYr = 1919, onsetYr = NA, 
         deathYr = NA, RR = 50, available = TRUE, Gen = 1, do_sim = TRUE), class = "data.frame", row.names = c(NA, 
     -1L)))
  5: xpdrows.data.frame(x, rows, new.rows)
  6: `[[<-`(`*tmp*`, i, value = NA_real_)
  7: `[[<-.data.frame`(`*tmp*`, i, value = NA_real_)
  8: stop(sprintf(ngettext(N, "replacement has %d row, data has %d", "replacement has %d rows, data has %d"), 
         N, nrows), domain = NA)
  
  ── 7. Error: returns a dataframe with the proband variable with a single proband
  replacement has 1 row, data has 0
  1: sim_RVped(hazard_rates = hazard(AgeSpecific_Hazards), GRR = 50, carrier_prob = 0.002, 
         RVfounder = TRUE, FamID = 1, num_affected = 2, recall_probs = c(1), founder_byears = c(1900, 
             1980), ascertain_span = c(1970, 2015)) at testthat/test_choose_proband.R:3
  2: sim_ped(hazard_rates, GRR, FamID, founder_byears, stop_year, carrier_prob, RVfounder, 
         NB_params, fert)
  3: `[<-`(`*tmp*`, 1, , value = structure(list(FamID = 1, ID = 1, sex = 1, dadID = NA, 
         momID = NA, affected = FALSE, DA1 = 1, DA2 = 0, birthYr = 1905, onsetYr = NA, 
         deathYr = NA, RR = 50, available = TRUE, Gen = 1, do_sim = TRUE), class = "data.frame", row.names = c(NA, 
     -1L)))
  4: `[<-.data.frame`(`*tmp*`, 1, , value = structure(list(FamID = 1, ID = 1, sex = 1, 
         dadID = NA, momID = NA, affected = FALSE, DA1 = 1, DA2 = 0, birthYr = 1905, onsetYr = NA, 
         deathYr = NA, RR = 50, available = TRUE, Gen = 1, do_sim = TRUE), class = "data.frame", row.names = c(NA, 
     -1L)))
  5: xpdrows.data.frame(x, rows, new.rows)
  6: `[[<-`(`*tmp*`, i, value = NA_real_)
  7: `[[<-.data.frame`(`*tmp*`, i, value = NA_real_)
  8: stop(sprintf(ngettext(N, "replacement has %d row, data has %d", "replacement has %d rows, data has %d"), 
         N, nrows), domain = NA)
  
  ── 8. Error: The proband is an affected and experienced onset during the ascerta
  replacement has 1 row, data has 0
  1: sim_RVped(hazard_rates = hazard(AgeSpecific_Hazards), GRR = 50, carrier_prob = 0.001, 
         RVfounder = TRUE, FamID = 1, num_affected = 2, recall_probs = c(1), founder_byears = c(1900, 
             1970), ascertain_span = c(1980, 2015)) at testthat/test_choose_proband.R:21
  2: sim_ped(hazard_rates, GRR, FamID, founder_byears, stop_year, carrier_prob, RVfounder, 
         NB_params, fert)
  3: `[<-`(`*tmp*`, 1, , value = structure(list(FamID = 1, ID = 1, sex = 1, dadID = NA, 
         momID = NA, affected = FALSE, DA1 = 0, DA2 = 1, birthYr = 1905, onsetYr = NA, 
         deathYr = NA, RR = 50, available = TRUE, Gen = 1, do_sim = TRUE), class = "data.frame", row.names = c(NA, 
     -1L)))
  4: `[<-.data.frame`(`*tmp*`, 1, , value = structure(list(FamID = 1, ID = 1, sex = 1, 
         dadID = NA, momID = NA, affected = FALSE, DA1 = 0, DA2 = 1, birthYr = 1905, onsetYr = NA, 
         deathYr = NA, RR = 50, available = TRUE, Gen = 1, do_sim = TRUE), class = "data.frame", row.names = c(NA, 
     -1L)))
  5: xpdrows.data.frame(x, rows, new.rows)
  6: `[[<-`(`*tmp*`, i, value = NA_real_)
  7: `[[<-.data.frame`(`*tmp*`, i, value = NA_real_)
  8: stop(sprintf(ngettext(N, "replacement has %d row, data has %d", "replacement has %d rows, data has %d"), 
         N, nrows), domain = NA)
  
  ── 9. Error: peds with fewer than num_affected relatives or affecteds are discar
  replacement has 1 row, data has 0
  1: sim_ped(hazard_rates = hazard(AgeSpecific_Hazards), GRR = 50, carrier_prob = 0.002, 
         RVfounder = TRUE, FamID = 1, founder_byears = c(1900, 1910)) at testthat/test_disqualify_ped.R:4
  2: `[<-`(`*tmp*`, 1, , value = structure(list(FamID = 1, ID = 1, sex = 0, dadID = NA, 
         momID = NA, affected = FALSE, DA1 = 1, DA2 = 0, birthYr = 1904, onsetYr = NA, 
         deathYr = NA, RR = 50, available = TRUE, Gen = 1, do_sim = TRUE), class = "data.frame", row.names = c(NA, 
     -1L)))
  3: `[<-.data.frame`(`*tmp*`, 1, , value = structure(list(FamID = 1, ID = 1, sex = 0, 
         dadID = NA, momID = NA, affected = FALSE, DA1 = 1, DA2 = 0, birthYr = 1904, onsetYr = NA, 
         deathYr = NA, RR = 50, available = TRUE, Gen = 1, do_sim = TRUE), class = "data.frame", row.names = c(NA, 
     -1L)))
  4: xpdrows.data.frame(x, rows, new.rows)
  5: `[[<-`(`*tmp*`, i, value = NA_real_)
  6: `[[<-.data.frame`(`*tmp*`, i, value = NA_real_)
  7: stop(sprintf(ngettext(N, "replacement has %d row, data has %d", "replacement has %d rows, data has %d"), 
         N, nrows), domain = NA)
  
  ── 10. Error: pedigrees must have members with appropriate onset years to be asc
  replacement has 1 row, data has 0
  1: sim_ped(hazard_rates = hazard(AgeSpecific_Hazards), GRR = 50, carrier_prob = 0.002, 
         RVfounder = TRUE, FamID = 1, founder_byears = c(1900, 1910)) at testthat/test_disqualify_ped.R:31
  2: `[<-`(`*tmp*`, 1, , value = structure(list(FamID = 1, ID = 1, sex = 1, dadID = NA, 
         momID = NA, affected = FALSE, DA1 = 1, DA2 = 0, birthYr = 1906, onsetYr = NA, 
         deathYr = NA, RR = 50, available = TRUE, Gen = 1, do_sim = TRUE), class = "data.frame", row.names = c(NA, 
     -1L)))
  3: `[<-.data.frame`(`*tmp*`, 1, , value = structure(list(FamID = 1, ID = 1, sex = 1, 
         dadID = NA, momID = NA, affected = FALSE, DA1 = 1, DA2 = 0, birthYr = 1906, onsetYr = NA, 
         deathYr = NA, RR = 50, available = TRUE, Gen = 1, do_sim = TRUE), class = "data.frame", row.names = c(NA, 
     -1L)))
  4: xpdrows.data.frame(x, rows, new.rows)
  5: `[[<-`(`*tmp*`, i, value = NA_real_)
  6: `[[<-.data.frame`(`*tmp*`, i, value = NA_real_)
  7: stop(sprintf(ngettext(N, "replacement has %d row, data has %d", "replacement has %d rows, data has %d"), 
         N, nrows), domain = NA)
  
  ── 11. Error: If unrelated, find_mcra returns NA (@test_find_mcra.R#5)  ────────
  replacement has 1 row, data has 0
  1: sim_ped(hazard_rates = hazard(hazardDF = AgeSpecific_Hazards), RVfounder = FALSE, 
         GRR = 10, FamID = 1, founder_byears = c(1800, 1900), stop_year = 2020) at testthat/test_find_mcra.R:5
  2: `[<-`(`*tmp*`, 1, , value = structure(list(FamID = 1, ID = 1, sex = 0, dadID = NA, 
         momID = NA, affected = FALSE, DA1 = 0, DA2 = 0, birthYr = 1801, onsetYr = NA, 
         deathYr = NA, RR = 1, available = TRUE, Gen = 1, do_sim = TRUE), class = "data.frame", row.names = c(NA, 
     -1L)))
  3: `[<-.data.frame`(`*tmp*`, 1, , value = structure(list(FamID = 1, ID = 1, sex = 0, 
         dadID = NA, momID = NA, affected = FALSE, DA1 = 0, DA2 = 0, birthYr = 1801, onsetYr = NA, 
         deathYr = NA, RR = 1, available = TRUE, Gen = 1, do_sim = TRUE), class = "data.frame", row.names = c(NA, 
     -1L)))
  4: xpdrows.data.frame(x, rows, new.rows)
  5: `[[<-`(`*tmp*`, i, value = NA_real_)
  6: `[[<-.data.frame`(`*tmp*`, i, value = NA_real_)
  7: stop(sprintf(ngettext(N, "replacement has %d row, data has %d", "replacement has %d rows, data has %d"), 
         N, nrows), domain = NA)
  
  ── 12. Error: If related, find_mcra returns at most two IDs (@test_find_mcra.R#2
  replacement has 1 row, data has 0
  1: sim_ped(hazard_rates = hazard(hazardDF = AgeSpecific_Hazards), RVfounder = FALSE, 
         GRR = 10, FamID = 1, founder_byears = c(1800, 1900), stop_year = 2020) at testthat/test_find_mcra.R:28
  2: `[<-`(`*tmp*`, 1, , value = structure(list(FamID = 1, ID = 1, sex = 0, dadID = NA, 
         momID = NA, affected = FALSE, DA1 = 0, DA2 = 0, birthYr = 1889, onsetYr = NA, 
         deathYr = NA, RR = 1, available = TRUE, Gen = 1, do_sim = TRUE), class = "data.frame", row.names = c(NA, 
     -1L)))
  3: `[<-.data.frame`(`*tmp*`, 1, , value = structure(list(FamID = 1, ID = 1, sex = 0, 
         dadID = NA, momID = NA, affected = FALSE, DA1 = 0, DA2 = 0, birthYr = 1889, onsetYr = NA, 
         deathYr = NA, RR = 1, available = TRUE, Gen = 1, do_sim = TRUE), class = "data.frame", row.names = c(NA, 
     -1L)))
  4: xpdrows.data.frame(x, rows, new.rows)
  5: `[[<-`(`*tmp*`, i, value = NA_real_)
  6: `[[<-.data.frame`(`*tmp*`, i, value = NA_real_)
  7: stop(sprintf(ngettext(N, "replacement has %d row, data has %d", "replacement has %d rows, data has %d"), 
         N, nrows), domain = NA)
  
  ── 13. Error: If related, find_mcra returns non-missing values (@test_find_mcra.
  replacement has 1 row, data has 0
  1: sim_ped(hazard_rates = hazard(hazardDF = AgeSpecific_Hazards), RVfounder = FALSE, 
         GRR = 10, FamID = 1, founder_byears = c(1800, 1900), stop_year = 2020) at testthat/test_find_mcra.R:57
  2: `[<-`(`*tmp*`, 1, , value = structure(list(FamID = 1, ID = 1, sex = 1, dadID = NA, 
         momID = NA, affected = FALSE, DA1 = 0, DA2 = 0, birthYr = 1878, onsetYr = NA, 
         deathYr = NA, RR = 1, available = TRUE, Gen = 1, do_sim = TRUE), class = "data.frame", row.names = c(NA, 
     -1L)))
  3: `[<-.data.frame`(`*tmp*`, 1, , value = structure(list(FamID = 1, ID = 1, sex = 1, 
         dadID = NA, momID = NA, affected = FALSE, DA1 = 0, DA2 = 0, birthYr = 1878, onsetYr = NA, 
         deathYr = NA, RR = 1, available = TRUE, Gen = 1, do_sim = TRUE), class = "data.frame", row.names = c(NA, 
     -1L)))
  4: xpdrows.data.frame(x, rows, new.rows)
  5: `[[<-`(`*tmp*`, i, value = NA_real_)
  6: `[[<-.data.frame`(`*tmp*`, i, value = NA_real_)
  7: stop(sprintf(ngettext(N, "replacement has %d row, data has %d", "replacement has %d rows, data has %d"), 
         N, nrows), domain = NA)
  
  ── 14. Error: If related, find_mcra returns an ID that is less than or equal to 
  replacement has 1 row, data has 0
  1: sim_ped(hazard_rates = hazard(hazardDF = AgeSpecific_Hazards), RVfounder = FALSE, 
         GRR = 10, FamID = 1, founder_byears = c(1800, 1900), stop_year = 2020) at testthat/test_find_mcra.R:94
  2: `[<-`(`*tmp*`, 1, , value = structure(list(FamID = 1, ID = 1, sex = 0, dadID = NA, 
         momID = NA, affected = FALSE, DA1 = 0, DA2 = 0, birthYr = 1871, onsetYr = NA, 
         deathYr = NA, RR = 1, available = TRUE, Gen = 1, do_sim = TRUE), class = "data.frame", row.names = c(NA, 
     -1L)))
  3: `[<-.data.frame`(`*tmp*`, 1, , value = structure(list(FamID = 1, ID = 1, sex = 0, 
         dadID = NA, momID = NA, affected = FALSE, DA1 = 0, DA2 = 0, birthYr = 1871, onsetYr = NA, 
         deathYr = NA, RR = 1, available = TRUE, Gen = 1, do_sim = TRUE), class = "data.frame", row.names = c(NA, 
     -1L)))
  4: xpdrows.data.frame(x, rows, new.rows)
  5: `[[<-`(`*tmp*`, i, value = NA_real_)
  6: `[[<-.data.frame`(`*tmp*`, i, value = NA_real_)
  7: stop(sprintf(ngettext(N, "replacement has %d row, data has %d", "replacement has %d rows, data has %d"), 
         N, nrows), domain = NA)
  
  ── 15. Error: reassign_gen returns a smaller or equally sized pedfile (@test_rea
  replacement has 1 row, data has 0
  1: sim_RVped(hazard_rates = hazard(AgeSpecific_Hazards), GRR = 50, carrier_prob = 0.002, 
         RVfounder = TRUE, FamID = 1, num_affected = 2, recall_probs = c(1), founder_byears = c(1900, 
             1905), ascertain_span = c(1980, 2015)) at testthat/test_reassign_gen.R:3
  2: sim_ped(hazard_rates, GRR, FamID, founder_byears, stop_year, carrier_prob, RVfounder, 
         NB_params, fert)
  3: `[<-`(`*tmp*`, 1, , value = structure(list(FamID = 1, ID = 1, sex = 0, dadID = NA, 
         momID = NA, affected = FALSE, DA1 = 1, DA2 = 0, birthYr = 1901, onsetYr = NA, 
         deathYr = NA, RR = 50, available = TRUE, Gen = 1, do_sim = TRUE), class = "data.frame", row.names = c(NA, 
     -1L)))
  4: `[<-.data.frame`(`*tmp*`, 1, , value = structure(list(FamID = 1, ID = 1, sex = 0, 
         dadID = NA, momID = NA, affected = FALSE, DA1 = 1, DA2 = 0, birthYr = 1901, onsetYr = NA, 
         deathYr = NA, RR = 50, available = TRUE, Gen = 1, do_sim = TRUE), class = "data.frame", row.names = c(NA, 
     -1L)))
  5: xpdrows.data.frame(x, rows, new.rows)
  6: `[[<-`(`*tmp*`, i, value = NA_real_)
  7: `[[<-.data.frame`(`*tmp*`, i, value = NA_real_)
  8: stop(sprintf(ngettext(N, "replacement has %d row, data has %d", "replacement has %d rows, data has %d"), 
         N, nrows), domain = NA)
  
  ── 16. Error: maximum re-assigned gen is at most maximum gen from original pedig
  replacement has 1 row, data has 0
  1: sim_ped(hazard_rates = hazard(hazardDF = AgeSpecific_Hazards), RVfounder = FALSE, 
         GRR = 10, FamID = 1, founder_byears = c(1700, 1800), stop_year = 2020) at testthat/test_reassign_gen.R:21
  2: `[<-`(`*tmp*`, 1, , value = structure(list(FamID = 1, ID = 1, sex = 1, dadID = NA, 
         momID = NA, affected = FALSE, DA1 = 0, DA2 = 0, birthYr = 1718, onsetYr = NA, 
         deathYr = NA, RR = 1, available = TRUE, Gen = 1, do_sim = TRUE), class = "data.frame", row.names = c(NA, 
     -1L)))
  3: `[<-.data.frame`(`*tmp*`, 1, , value = structure(list(FamID = 1, ID = 1, sex = 1, 
         dadID = NA, momID = NA, affected = FALSE, DA1 = 0, DA2 = 0, birthYr = 1718, onsetYr = NA, 
         deathYr = NA, RR = 1, available = TRUE, Gen = 1, do_sim = TRUE), class = "data.frame", row.names = c(NA, 
     -1L)))
  4: xpdrows.data.frame(x, rows, new.rows)
  5: `[[<-`(`*tmp*`, i, value = NA_real_)
  6: `[[<-.data.frame`(`*tmp*`, i, value = NA_real_)
  7: stop(sprintf(ngettext(N, "replacement has %d row, data has %d", "replacement has %d rows, data has %d"), 
         N, nrows), domain = NA)
  
  ── 17. Error: we never have two affected individuals with reassigned gen = 1 (@t
  replacement has 1 row, data has 0
  1: sim_ped(hazard_rates = hazard(hazardDF = AgeSpecific_Hazards), RVfounder = FALSE, 
         GRR = 10, FamID = 1, founder_byears = c(1800, 1900), stop_year = 2020) at testthat/test_reassign_gen.R:50
  2: `[<-`(`*tmp*`, 1, , value = structure(list(FamID = 1, ID = 1, sex = 0, dadID = NA, 
         momID = NA, affected = FALSE, DA1 = 0, DA2 = 0, birthYr = 1841, onsetYr = NA, 
         deathYr = NA, RR = 1, available = TRUE, Gen = 1, do_sim = TRUE), class = "data.frame", row.names = c(NA, 
     -1L)))
  3: `[<-.data.frame`(`*tmp*`, 1, , value = structure(list(FamID = 1, ID = 1, sex = 0, 
         dadID = NA, momID = NA, affected = FALSE, DA1 = 0, DA2 = 0, birthYr = 1841, onsetYr = NA, 
         deathYr = NA, RR = 1, available = TRUE, Gen = 1, do_sim = TRUE), class = "data.frame", row.names = c(NA, 
     -1L)))
  4: xpdrows.data.frame(x, rows, new.rows)
  5: `[[<-`(`*tmp*`, i, value = NA_real_)
  6: `[[<-.data.frame`(`*tmp*`, i, value = NA_real_)
  7: stop(sprintf(ngettext(N, "replacement has %d row, data has %d", "replacement has %d rows, data has %d"), 
         N, nrows), domain = NA)
  
  ── 18. Error: returns an error if at least two if the disease-affected relatives
  replacement has 1 row, data has 0
  1: sim_ped(hazard_rates = hazard(hazardDF = AgeSpecific_Hazards), RVfounder = FALSE, 
         GRR = 10, FamID = 1, founder_byears = c(1800, 1900), stop_year = 2020) at testthat/test_reassign_gen.R:83
  2: `[<-`(`*tmp*`, 1, , value = structure(list(FamID = 1, ID = 1, sex = 0, dadID = NA, 
         momID = NA, affected = FALSE, DA1 = 0, DA2 = 0, birthYr = 1873, onsetYr = NA, 
         deathYr = NA, RR = 1, available = TRUE, Gen = 1, do_sim = TRUE), class = "data.frame", row.names = c(NA, 
     -1L)))
  3: `[<-.data.frame`(`*tmp*`, 1, , value = structure(list(FamID = 1, ID = 1, sex = 0, 
         dadID = NA, momID = NA, affected = FALSE, DA1 = 0, DA2 = 0, birthYr = 1873, onsetYr = NA, 
         deathYr = NA, RR = 1, available = TRUE, Gen = 1, do_sim = TRUE), class = "data.frame", row.names = c(NA, 
     -1L)))
  4: xpdrows.data.frame(x, rows, new.rows)
  5: `[[<-`(`*tmp*`, i, value = NA_real_)
  6: `[[<-.data.frame`(`*tmp*`, i, value = NA_real_)
  7: stop(sprintf(ngettext(N, "replacement has %d row, data has %d", "replacement has %d rows, data has %d"), 
         N, nrows), domain = NA)
  
  ── 19. Error: (unknown) (@test_sim_RVped.R#3)  ─────────────────────────────────
  replacement has 1 row, data has 0
  1: sim_RVped(hazard_rates = hazard(AgeSpecific_Hazards), GRR = 35, carrier_prob = 0.002, 
         RVfounder = TRUE, FamID = 1, num_affected = 2, recall_probs = c(1), founder_byears = c(1900, 
             1910), ascertain_span = c(1970, 2015)) at testthat/test_sim_RVped.R:3
  2: sim_ped(hazard_rates, GRR, FamID, founder_byears, stop_year, carrier_prob, RVfounder, 
         NB_params, fert)
  3: `[<-`(`*tmp*`, 1, , value = structure(list(FamID = 1, ID = 1, sex = 1, dadID = NA, 
         momID = NA, affected = FALSE, DA1 = 1, DA2 = 0, birthYr = 1908, onsetYr = NA, 
         deathYr = NA, RR = 35, available = TRUE, Gen = 1, do_sim = TRUE), class = "data.frame", row.names = c(NA, 
     -1L)))
  4: `[<-.data.frame`(`*tmp*`, 1, , value = structure(list(FamID = 1, ID = 1, sex = 1, 
         dadID = NA, momID = NA, affected = FALSE, DA1 = 1, DA2 = 0, birthYr = 1908, onsetYr = NA, 
         deathYr = NA, RR = 35, available = TRUE, Gen = 1, do_sim = TRUE), class = "data.frame", row.names = c(NA, 
     -1L)))
  5: xpdrows.data.frame(x, rows, new.rows)
  6: `[[<-`(`*tmp*`, i, value = NA_real_)
  7: `[[<-.data.frame`(`*tmp*`, i, value = NA_real_)
  8: stop(sprintf(ngettext(N, "replacement has %d row, data has %d", "replacement has %d rows, data has %d"), 
         N, nrows), domain = NA)
  
  ── 20. Error: returns a single ped file dataframe (@test_sim_ped.R#3)  ─────────
  replacement has 1 row, data has 0
  1: expect_true(is.data.frame(sim_ped(hazard_rates = hazard(AgeSpecific_Hazards), GRR = 10, 
         carrier_prob = 0.002, RVfounder = TRUE, FamID = 1, stop_year = 2015, founder_byears = c(1900, 
             1905)))) at testthat/test_sim_ped.R:3
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: is.data.frame(sim_ped(hazard_rates = hazard(AgeSpecific_Hazards), GRR = 10, carrier_prob = 0.002, 
         RVfounder = TRUE, FamID = 1, stop_year = 2015, founder_byears = c(1900, 1905)))
  5: sim_ped(hazard_rates = hazard(AgeSpecific_Hazards), GRR = 10, carrier_prob = 0.002, 
         RVfounder = TRUE, FamID = 1, stop_year = 2015, founder_byears = c(1900, 1905))
  6: `[<-`(`*tmp*`, 1, , value = structure(list(FamID = 1, ID = 1, sex = 0, dadID = NA, 
         momID = NA, affected = FALSE, DA1 = 1, DA2 = 0, birthYr = 1901, onsetYr = NA, 
         deathYr = NA, RR = 10, available = TRUE, Gen = 1, do_sim = TRUE), class = "data.frame", row.names = c(NA, 
     -1L)))
  7: `[<-.data.frame`(`*tmp*`, 1, , value = structure(list(FamID = 1, ID = 1, sex = 0, 
         dadID = NA, momID = NA, affected = FALSE, DA1 = 1, DA2 = 0, birthYr = 1901, onsetYr = NA, 
         deathYr = NA, RR = 10, available = TRUE, Gen = 1, do_sim = TRUE), class = "data.frame", row.names = c(NA, 
     -1L)))
  8: xpdrows.data.frame(x, rows, new.rows)
  9: `[[<-`(`*tmp*`, i, value = NA_real_)
  10: `[[<-.data.frame`(`*tmp*`, i, value = NA_real_)
  11: stop(sprintf(ngettext(N, "replacement has %d row, data has %d", "replacement has %d rows, data has %d"), 
         N, nrows), domain = NA)
  
  ── 21. Error: pedigree always contains at least 1 person (@test_sim_ped.R#12)  ─
  replacement has 1 row, data has 0
  1: expect_true(nrow(sim_ped(hazard_rates = hazard(AgeSpecific_Hazards), GRR = 10, carrier_prob = 0.002, 
         RVfounder = TRUE, FamID = 1, stop_year = 2015, founder_byears = c(1900, 1905))) >= 
         1) at testthat/test_sim_ped.R:12
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: nrow(sim_ped(hazard_rates = hazard(AgeSpecific_Hazards), GRR = 10, carrier_prob = 0.002, 
         RVfounder = TRUE, FamID = 1, stop_year = 2015, founder_byears = c(1900, 1905)))
  5: sim_ped(hazard_rates = hazard(AgeSpecific_Hazards), GRR = 10, carrier_prob = 0.002, 
         RVfounder = TRUE, FamID = 1, stop_year = 2015, founder_byears = c(1900, 1905))
  6: `[<-`(`*tmp*`, 1, , value = structure(list(FamID = 1, ID = 1, sex = 0, dadID = NA, 
         momID = NA, affected = FALSE, DA1 = 1, DA2 = 0, birthYr = 1900, onsetYr = NA, 
         deathYr = NA, RR = 10, available = TRUE, Gen = 1, do_sim = TRUE), class = "data.frame", row.names = c(NA, 
     -1L)))
  7: `[<-.data.frame`(`*tmp*`, 1, , value = structure(list(FamID = 1, ID = 1, sex = 0, 
         dadID = NA, momID = NA, affected = FALSE, DA1 = 1, DA2 = 0, birthYr = 1900, onsetYr = NA, 
         deathYr = NA, RR = 10, available = TRUE, Gen = 1, do_sim = TRUE), class = "data.frame", row.names = c(NA, 
     -1L)))
  8: xpdrows.data.frame(x, rows, new.rows)
  9: `[[<-`(`*tmp*`, i, value = NA_real_)
  10: `[[<-.data.frame`(`*tmp*`, i, value = NA_real_)
  11: stop(sprintf(ngettext(N, "replacement has %d row, data has %d", "replacement has %d rows, data has %d"), 
         N, nrows), domain = NA)
  
  ── 22. Error: Effects of RVfounder = 'first'  (@test_sim_ped.R#20)  ────────────
  replacement has 1 row, data has 0
  1: sim_ped(hazard_rates = hazard(AgeSpecific_Hazards), GRR = 10, carrier_prob = 0.002, 
         RVfounder = TRUE, FamID = 1, stop_year = 2015, founder_byears = c(1900, 1905)) at testthat/test_sim_ped.R:20
  2: `[<-`(`*tmp*`, 1, , value = structure(list(FamID = 1, ID = 1, sex = 1, dadID = NA, 
         momID = NA, affected = FALSE, DA1 = 1, DA2 = 0, birthYr = 1901, onsetYr = NA, 
         deathYr = NA, RR = 10, available = TRUE, Gen = 1, do_sim = TRUE), class = "data.frame", row.names = c(NA, 
     -1L)))
  3: `[<-.data.frame`(`*tmp*`, 1, , value = structure(list(FamID = 1, ID = 1, sex = 1, 
         dadID = NA, momID = NA, affected = FALSE, DA1 = 1, DA2 = 0, birthYr = 1901, onsetYr = NA, 
         deathYr = NA, RR = 10, available = TRUE, Gen = 1, do_sim = TRUE), class = "data.frame", row.names = c(NA, 
     -1L)))
  4: xpdrows.data.frame(x, rows, new.rows)
  5: `[[<-`(`*tmp*`, i, value = NA_real_)
  6: `[[<-.data.frame`(`*tmp*`, i, value = NA_real_)
  7: stop(sprintf(ngettext(N, "replacement has %d row, data has %d", "replacement has %d rows, data has %d"), 
         N, nrows), domain = NA)
  
  ── 23. Error: If GRR = 1 (@test_sim_ped.R#35)  ─────────────────────────────────
  replacement has 1 row, data has 0
  1: sim_ped(hazard_rates = hazard(AgeSpecific_Hazards), GRR = 1, carrier_prob = 0.002, 
         FamID = 1, stop_year = 2015, founder_byears = c(1900, 1905)) at testthat/test_sim_ped.R:35
  2: `[<-`(`*tmp*`, 1, , value = structure(list(FamID = 1, ID = 1, sex = 0, dadID = NA, 
         momID = NA, affected = FALSE, DA1 = 0, DA2 = 0, birthYr = 1905, onsetYr = NA, 
         deathYr = NA, RR = 1, available = TRUE, Gen = 1, do_sim = TRUE), class = "data.frame", row.names = c(NA, 
     -1L)))
  3: `[<-.data.frame`(`*tmp*`, 1, , value = structure(list(FamID = 1, ID = 1, sex = 0, 
         dadID = NA, momID = NA, affected = FALSE, DA1 = 0, DA2 = 0, birthYr = 1905, onsetYr = NA, 
         deathYr = NA, RR = 1, available = TRUE, Gen = 1, do_sim = TRUE), class = "data.frame", row.names = c(NA, 
     -1L)))
  4: xpdrows.data.frame(x, rows, new.rows)
  5: `[[<-`(`*tmp*`, i, value = NA_real_)
  6: `[[<-.data.frame`(`*tmp*`, i, value = NA_real_)
  7: stop(sprintf(ngettext(N, "replacement has %d row, data has %d", "replacement has %d rows, data has %d"), 
         N, nrows), domain = NA)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 35 SKIPPED: 0 FAILED: 23
  1. Error: (unknown) (@test_ascertain_ped.R#3) 
  2. Error: returns a ped with the correct generations (@test_assign_gen.R#4) 
  3. Error: censor_ped returns an error when expected (@test_censor_ped.R#3) 
  4. Error: censor_ped returns a smaller or equally sized ped (@test_censor_ped.R#30) 
  5. Error: censor_ped does not return any info after the censor year (@test_censor_ped.R#43) 
  6. Error: censor_ped issues a warnign if birthYr data missing (@test_censor_ped.R#62) 
  7. Error: returns a dataframe with the proband variable with a single proband (@test_choose_proband.R#3) 
  8. Error: The proband is an affected and experienced onset during the ascertainment span (@test_choose_proband.R#21) 
  9. Error: peds with fewer than num_affected relatives or affecteds are discarded (@test_disqualify_ped.R#4) 
  1. ...
  
  Error: testthat unit tests failed
  Execution halted