Skip to content

Commit eaaa59b

Browse files
Update test-buildmxPedigrees.R
1 parent ac2c077 commit eaaa59b

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

tests/testthat/test-buildmxPedigrees.R

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -237,9 +237,9 @@ test_that("fitPedigreeModel errors without OpenMx", {
237237
regexp = "OpenMx"
238238
)
239239

240-
expect_error(
241-
.require_openmx()
242-
)
240+
expect_error(
241+
.require_openmx()
242+
)
243243
})
244244

245245
test_that("fitPedigreeModel runs end-to-end with a trivial dataset", {
@@ -350,7 +350,8 @@ test_that("alignPhenToMatrix returns NA for IDs not present in the pedigree", {
350350
ped <- data.frame(ID = c(1L, 2L), pheno = c(1.0, 2.0))
351351
result <- alignPhenToMatrix(ped, phenotype = "pheno", keep_ids = c(1L, 99L))
352352
expect_equal(ncol(result), 2L)
353-
expect_equal(result[1, 1], 1.0)
353+
ref_mat <- matrix(c(1.0, NA), nrow = 1, dimnames = list(NULL, c("X1", "X99")))
354+
expect_equal(result[1, 1], ref_mat[1, 1])
354355
expect_true(is.na(result[1, 2]))
355356
})
356357

0 commit comments

Comments
 (0)