Skip to content

Commit

Permalink
Update test-methodCCLS.R
Browse files Browse the repository at this point in the history
Allow 'test_sl1' to be available outside of the 'expect_warning' call
  • Loading branch information
ecpolley committed Mar 9, 2018
1 parent 51336b7 commit 366fcc5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/testthat/test-methodCCLS.R
Expand Up @@ -11,7 +11,7 @@ simY <- 10*simX$a + rnorm(n)
test_that("Function works with/without duplicates.",{
# should throw a warning for duplicated columns
set.seed(1234)
expect_warning(test_sl1 <- SuperLearner(Y = simY, X = simX,
expect_warning(test_sl1 <<- SuperLearner(Y = simY, X = simX,
method = "method.CC_LS",
SL.library = c("SL.glm","SL.glm","SL.mean")))
# second coefficient should be 0
Expand Down

0 comments on commit 366fcc5

Please sign in to comment.