Closed washcycle closed 7 years ago
tests/testthat/test-caretStack.R:123:3: style: Words within variable and function names should be separated by '_' rather than '.'.
X.reg.na <- X.reg
^~~~~~~~
tests/testthat/test-caretStack.R:125:3: style: Words within variable and function names should be separated by '_' rather than '.'.
X.reg.na[sample(1:nrow(X.reg.na), 20), sample(1:ncol(X.reg.na)-1, 1)] <- NA
^~~~~~~~
tests/testthat/test-caretStack.R:125:26: style: Words within variable and function names should be separated by '_' rather than '.'.
X.reg.na[sample(1:nrow(X.reg.na), 20), sample(1:ncol(X.reg.na)-1, 1)] <- NA
^~~~~~~~
tests/testthat/test-caretStack.R:125:56: style: Words within variable and function names should be separated by '_' rather than '.'.
X.reg.na[sample(1:nrow(X.reg.na), 20), sample(1:ncol(X.reg.na)-1, 1)] <- NA
^~~~~~~~
tests/testthat/test-caretStack.R:127:57: style: Words within variable and function names should be separated by '_' rather than '.'.
expect_warning(pred.reg <- predict(ens.reg, newdata = X.reg.na, na.action = na.pass))
^~~~~~~~
tests/testthat/test-caretStack.R:128:32: style: Words within variable and function names should be separated by '_' rather than '.'.
expect_length(pred.reg, nrow(X.reg.na))
^~~~~~~~
tests/testthat/test-caretStack.R:130:57: style: Words within variable and function names should be separated by '_' rather than '.'.
expect_warning(pred.reg <- predict(ens.reg, newdata = X.reg.na))
^~~~~~~~
tests/testthat/test-caretStack.R:131:42: style: Words within variable and function names should be separated by '_' rather than '.'.
expect_false(length(pred.reg) != nrow(X.reg.na))
^~~~~~~~
Looks good. You need to delint, and I think you need to add roxygen2 tags for the s3 methods (as
and [
).
And then I had a comment on the test. Thanks!
Actually a few other comments, but in general 👍
tests/testthat/test-caretStack.R:127:57: style: Words within variable and function names should be separated by '_' rather than '.'.
expect_warning(pred.reg <- predict(ens.reg, newdata = X.reg.na, na.action = na.pass))
^~~~~~~~
tests/testthat/test-caretStack.R:128:32: style: Words within variable and function names should be separated by '_' rather than '.'.
expect_length(pred.reg, nrow(X.reg.na))
^~~~~~~~
tests/testthat/test-caretStack.R:130:57: style: Words within variable and function names should be separated by '_' rather than '.'.
expect_warning(pred.reg <- predict(ens.reg, newdata = X.reg.na))
^~~~~~~~
tests/testthat/test-caretStack.R:131:42: style: Words within variable and function names should be separated by '_' rather than '.'.
expect_false(length(pred.reg) != nrow(X.reg.na))
^~~~~~~~
I think this one is ready. I got all turned around with how the documentation was being generated.
[
generic forcaretList
andas.caretList
.na.action
pass-through for caretStack predictions to go to lower level models. This makes handling NA values more robust for the ensembleThis should close: Issue #104
Replaces Pull #211 and #212
I'd say these aren't robust as they could be, but I think they are still extremely useful in their current form.