Skip to content

Commit

Permalink
import rather than depends on caret
Browse files Browse the repository at this point in the history
  • Loading branch information
zachmayer committed Feb 5, 2016
1 parent 422e7f7 commit c201a3e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ Description: Functions for creating ensembles of caret models: caretList
meta-model, and caretEnsemble will make a robust linear combination of
models using a glm.
Depends:
R (>= 3.2.0),
caret
R (>= 3.2.0)
Suggests:
caTools,
testthat,
Expand All @@ -42,7 +41,8 @@ Imports:
plyr,
lattice,
gridExtra,
data.table
data.table,
caret
License: MIT + file LICENSE
VignetteBuilder: knitr
RoxygenNote: 5.0.1

1 comment on commit c201a3e

@lintr-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

inst/doc/caretEnsemble-intro.R:14:28: style: Commas should always have a space after.

training <- Sonar[ inTrain,]
                           ^

inst/doc/caretEnsemble-intro.R:15:27: style: Commas should always have a space after.

testing <- Sonar[-inTrain,]
                          ^

inst/doc/caretEnsemble-intro.R:70:14: style: Trailing whitespace is superfluous.

model_list, 
             ^

inst/doc/caretEnsemble-intro.R:82:51: style: Commas should always have a space after.

model_preds <- lapply(model_preds, function(x) x[,"M"])
                                                  ^

inst/doc/caretEnsemble-intro.R:136:1: style: Trailing blank lines are superfluous.

^

R/caretEnsemble.R:145:76: style: Commas should always have a space after.

tmp.t <- out[attributes(out)$dimnames[[nams[[i]]]] == as.character(bt[,nams[i]])]
                                                                           ^

R/caretEnsemble.R:192:38: style: Commas should always have a space after.

dat <- dat[order(dat[["overall"]]),]
                                     ^

R/caretEnsemble.R:200:33: style: Commas should always have a space after.

x$importance <- x$importance[,"Overall", drop=FALSE]
                                ^

R/caretEnsemble.R:213:36: style: Commas should always have a space after.

dat$model <- sub("\\.[^\n]*", "",dat$id)
                                   ^

R/caretEnsemble.R:223:26: style: Commas should always have a space after.

​  row.names(dat) <- dat[,1]
                         ^

R/caretEnsemble.R:224:15: style: Commas should always have a space after.

return(dat[,-1])
              ^

R/caretList.R:268:69: style: Commas should always have a space after.

caret::predict.train(x, type="prob", newdata=newdata, ...)[,2]
                                                                    ^

R/helper_functions.R:15:30: style: Commas should always have a space after.

xWbar <- weighted.mean(x,w,na.rm=na.rm)
                             ^

R/helper_functions.R:15:32: style: Commas should always have a space after.

xWbar <- weighted.mean(x,w,na.rm=na.rm)
                               ^

R/helper_functions.R:63:78: style: Commas should always have a space after.

probModels <- sapply(list_of_models, function(x) modelLookup(x$method)[1,"probModel"])
                                                                             ^

R/helper_functions.R:177:12: style: Commas should always have a space after.

b <- b[a,]
           ^

R/helper_functions.R:245:87: style: Commas should always have a space after.

​    set(modelLibrary, i=good_pos_values, j="pred", value=modelLibrary[good_pos_values,positive,with=FALSE])
                                                                                      ^

R/helper_functions.R:245:96: style: Commas should always have a space after.

​    set(modelLibrary, i=good_pos_values, j="pred", value=modelLibrary[good_pos_values,positive,with=FALSE])
                                                                                               ^

R/helper_functions.R:256:67: style: Commas should always have a space after.

return(list(obs=modelLibrary$obs, preds=as.matrix(modelLibrary[,model_names,with=FALSE]), type=type))
                                                                  ^

R/helper_functions.R:256:79: style: Commas should always have a space after.

return(list(obs=modelLibrary$obs, preds=as.matrix(modelLibrary[,model_names,with=FALSE]), type=type))
                                                                              ^

tests/testthat/test-caretList.R:62:41: style: Commas should always have a space after.

​  expect_equal(extractCaretTarget(iris[,1:4], iris[,5]), iris[,5])
                                        ^

tests/testthat/test-caretList.R:62:53: style: Commas should always have a space after.

​  expect_equal(extractCaretTarget(iris[,1:4], iris[,5]), iris[,5])
                                                    ^

tests/testthat/test-caretList.R:62:64: style: Commas should always have a space after.

​  expect_equal(extractCaretTarget(iris[,1:4], iris[,5]), iris[,5])
                                                               ^

tests/testthat/test-caretList.R:63:41: style: Commas should always have a space after.

​  expect_equal(extractCaretTarget(iris[,2:5], iris[,1]), iris[,1])
                                        ^

tests/testthat/test-caretList.R:63:53: style: Commas should always have a space after.

​  expect_equal(extractCaretTarget(iris[,2:5], iris[,1]), iris[,1])
                                                    ^

tests/testthat/test-caretList.R:63:64: style: Commas should always have a space after.

​  expect_equal(extractCaretTarget(iris[,2:5], iris[,1]), iris[,1])
                                                               ^

tests/testthat/test-caretList.R:64:61: style: Commas should always have a space after.

​  expect_equal(extractCaretTarget(Species ~ ., iris), iris[,"Species"])
                                                            ^

tests/testthat/test-caretList.R:65:65: style: Commas should always have a space after.

​  expect_equal(extractCaretTarget(Sepal.Width ~ ., iris), iris[,"Sepal.Width"])
                                                                ^

tests/testthat/test-caretList.R:86:36: style: Commas should always have a space after.

​      expect_error(caretList(iris[,1:4], iris[,5], tuneList=bad_bad, trControl=my_control))
                                   ^

tests/testthat/test-caretList.R:86:48: style: Commas should always have a space after.

​      expect_error(caretList(iris[,1:4], iris[,5], tuneList=bad_bad, trControl=my_control))
                                               ^

tests/testthat/test-caretList.R:87:36: style: Commas should always have a space after.

​      expect_error(caretList(iris[,1:4], iris[,5], tuneList=good_bad, trControl=my_control))
                                   ^

tests/testthat/test-caretList.R:87:48: style: Commas should always have a space after.

​      expect_error(caretList(iris[,1:4], iris[,5], tuneList=good_bad, trControl=my_control))
                                               ^

tests/testthat/test-caretList.R:88:36: style: Commas should always have a space after.

​      expect_error(caretList(iris[,1:4], iris[,5], tuneList=bad_bad, trControl=my_control, continue_on_fail=TRUE))
                                   ^

tests/testthat/test-caretList.R:88:48: style: Commas should always have a space after.

​      expect_error(caretList(iris[,1:4], iris[,5], tuneList=bad_bad, trControl=my_control, continue_on_fail=TRUE))
                                               ^

tests/testthat/test-caretList.R:89:33: style: Commas should always have a space after.

​      expect_is(caretList(iris[,1:4], iris[,5], tuneList=good_bad, trControl=my_control, continue_on_fail=TRUE), "caretList")
                                ^

tests/testthat/test-caretList.R:89:45: style: Commas should always have a space after.

​      expect_is(caretList(iris[,1:4], iris[,5], tuneList=good_bad, trControl=my_control, continue_on_fail=TRUE), "caretList")
                                            ^

tests/testthat/test-caretList.R:100:13: style: Commas should always have a space after.

iris[,1:2], iris[,5],
            ^

tests/testthat/test-caretList.R:100:25: style: Commas should always have a space after.

iris[,1:2], iris[,5],
                        ^

tests/testthat/test-caretList.R:113:17: style: Commas should always have a space after.

​  expect_is(p1[,1], "character")
                ^

tests/testthat/test-caretList.R:114:17: style: Commas should always have a space after.

​  expect_is(p1[,2], "character")
                ^

tests/testthat/test-caretList.R:117:17: style: Commas should always have a space after.

​  expect_is(p2[,1], "character")
                ^

tests/testthat/test-caretList.R:118:17: style: Commas should always have a space after.

​  expect_is(p2[,2], "character")
                ^

tests/testthat/test-caretList.R:121:17: style: Commas should always have a space after.

​  expect_is(p3[,1], "character")
                ^

tests/testthat/test-caretList.R:122:17: style: Commas should always have a space after.

​  expect_is(p3[,2], "character")
                ^

tests/testthat/test-caretList.R:127:13: style: Commas should always have a space after.

iris[,1:2], iris[,5],
            ^

tests/testthat/test-caretList.R:127:25: style: Commas should always have a space after.

iris[,1:2], iris[,5],
                        ^

tests/testthat/test-caretList.R:136:17: style: Commas should always have a space after.

​  expect_is(p2[,1], "numeric")
                ^

tests/testthat/test-caretList.R:137:17: style: Commas should always have a space after.

​  expect_is(p2[,2], "numeric")
                ^

tests/testthat/test-caretList.R:139:17: style: Commas should always have a space after.

​  expect_is(p3[,1], "numeric")
                ^

tests/testthat/test-caretList.R:140:17: style: Commas should always have a space after.

​  expect_is(p3[,2], "numeric")
                ^

tests/testthat/test-caretList.R:160:17: style: Commas should always have a space after.

x = iris[,1:3],
                ^

tests/testthat/test-caretList.R:161:17: style: Commas should always have a space after.

y = iris[,4],
                ^

tests/testthat/test-caretList.R:205:23: style: Commas should always have a space after.

x = iris[,1:3],
                      ^

tests/testthat/test-caretList.R:206:23: style: Commas should always have a space after.

y = iris[,4],
                      ^

tests/testthat/test-caretList.R:332:18: style: Commas should never have a space before.

y = train[ , "Class"],
                ~^

tests/testthat/test-caretList.R:448:37: style: Commas should always have a space after.

tuneGrid=data.frame(.cp=c(.01,.001,.1,1))
                                    ^

tests/testthat/test-caretList.R:448:42: style: Commas should always have a space after.

tuneGrid=data.frame(.cp=c(.01,.001,.1,1))
                                         ^

tests/testthat/test-caretList.R:448:45: style: Commas should always have a space after.

tuneGrid=data.frame(.cp=c(.01,.001,.1,1))
                                            ^

tests/testthat/test-caretList.R:519:14: style: Commas should always have a space after.

x <- iris[,1:3]
             ^

tests/testthat/test-caretList.R:520:14: style: Commas should always have a space after.

y <- iris[,4]
             ^

tests/testthat/test-ensembleMethods.R:200:40: style: Commas should always have a space after.

mr1 <- mr1[order(mr1$method, mr1$id),]
                                       ^

tests/testthat/test-ensembleMethods.R:201:40: style: Commas should always have a space after.

mr2 <- mr2[order(mr2$method, mr2$id),]
                                       ^

tests/testthat/test-ensembleMethods.R:220:70: style: Commas should always have a space after.

​  expect_equal(mr_reg_long[order(mr_reg_long$method, mr_reg_long$id),"resid"], mr2[order(mr2$method, mr2$id),"resid"])
                                                                     ^

tests/testthat/test-ensembleMethods.R:220:110: style: Commas should always have a space after.

​  expect_equal(mr_reg_long[order(mr_reg_long$method, mr_reg_long$id),"resid"], mr2[order(mr2$method, mr2$id),"resid"])
                                                                                                             ^

tests/testthat/test-ensembleMethods.R:281:20: style: Commas should always have a space after.

se=tests[i,"se"],
                   ^

tests/testthat/test-ensembleMethods.R:282:32: style: Commas should always have a space after.

return_weights=tests[i,"return_weights"]
                               ^

tests/testthat/test-ensembleMethods.R:286:16: style: Commas should always have a space after.

if(tests[i,"se"]){
               ^

tests/testthat/test-ensembleMethods.R:294:16: style: Commas should always have a space after.

if(tests[i,"return_weights"]){
               ^

tests/testthat/test-ensembleMethods.R:309:20: style: Commas should always have a space after.

se=tests[i,"se"],
                   ^

tests/testthat/test-ensembleMethods.R:310:32: style: Commas should always have a space after.

return_weights=tests[i,"return_weights"],
                               ^

tests/testthat/test-ensembleMethods.R:315:16: style: Commas should always have a space after.

if(tests[i,"se"]){
               ^

tests/testthat/test-ensembleMethods.R:323:16: style: Commas should always have a space after.

if(tests[i,"return_weights"]){
               ^

tests/testthat/test-ensemble.R:28:11: style: Commas should always have a space after.

iris[,1:2], iris[,3], method="lm",
          ^

tests/testthat/test-ensemble.R:28:23: style: Commas should always have a space after.

iris[,1:2], iris[,3], method="lm",
                      ^

tests/testthat/test-ensemble.R:56:11: style: Commas should always have a space after.

iris[,1:2], iris[,3], method="lm",
          ^

tests/testthat/test-ensemble.R:56:23: style: Commas should always have a space after.

iris[,1:2], iris[,3], method="lm",
                      ^

tests/testthat/test-helper_functions.R:28:13: style: Commas should always have a space after.

iris[,1:2], iris[,5],
            ^

tests/testthat/test-helper_functions.R:28:25: style: Commas should always have a space after.

iris[,1:2], iris[,5],
                        ^

tests/testthat/test-helper_functions.R:37:13: style: Commas should always have a space after.

iris[,1:2], factor(ifelse(iris[,5]=="setosa", "Yes", "No")),
            ^

tests/testthat/test-helper_functions.R:37:39: style: Commas should always have a space after.

iris[,1:2], factor(ifelse(iris[,5]=="setosa", "Yes", "No")),
                                      ^

tests/testthat/test-helper_functions.R:43:11: style: Commas should always have a space after.

iris[,1:2], factor(ifelse(iris[,5]=="setosa", "Yes", "No")),
          ^

tests/testthat/test-helper_functions.R:43:37: style: Commas should always have a space after.

iris[,1:2], factor(ifelse(iris[,5]=="setosa", "Yes", "No")),
                                    ^

tests/testthat/test-helper_functions.R:151:93: style: Commas should always have a space after.

modelLibrary$nn <- modelLibrary$lm[sample(1:nrow(modelLibrary$lm), nrow(modelLibrary$lm)),]
                                                                                            ^

tests/testthat/test-helper_functions.R:185:18: style: Commas should always have a space after.

iris[1:100,-5],
                 ^

Please sign in to comment.