Skip to content

Commit

Permalink
Fixing formatting unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
Admin_mschuemi authored and Admin_mschuemi committed Jan 16, 2025
1 parent be60d19 commit b25f4db
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions R/Formatting.R
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ MapIds <- function(
covariateId = covariateData$covariates %>%
dplyr::inner_join(covariateData$rowMap, by = "rowId") %>% # first restrict the covariates to the rowMap$rowId
dplyr::distinct(.data$covariateId) %>%
dplyr::arrange(.data$covariateId) %>%
dplyr::pull()
)
mapping$columnId <- 1:nrow(mapping)
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-formatting.R
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ test_that("toSparseM", {
sparseMat.test <- toSparseM(FplpData, Fpopulation, map = NULL)
matrix.real <- matrix(rep(0, 5 * 7), ncol = 7)
x <- c(1, 1, 1, 3, 3, 3, 5, 5)
y <- c(1, 2, 3, 2, 4, 5, 6, 7)
y <- c(5, 6, 7, 1, 2, 7, 3, 4)
for (a in 1:8) matrix.real[x[a], y[a]] <- 1
expect_that(as.matrix(sparseMat.test$dataMatrix), is_equivalent_to(matrix.real))

Expand Down

0 comments on commit b25f4db

Please sign in to comment.