Not reproducible [1][2][3]. (Missing references to packages and "b" data frame.) Also, posting with html format makes extracting your code unreliable, so set your email program to send plain text for this mailing list.
[1] http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example [2] http://adv-r.had.co.nz/Reproducibility.html [3] https://cran.r-project.org/web/packages/reprex/index.html (read the vignette) -- Sent from my phone. Please excuse my brevity. On January 1, 2018 12:02:30 PM PST, greg holly <mak.hho...@gmail.com> wrote: >Hi all; > >Happy new year. I have got the following error > >rror in if (nrow(object$splits) > 0) { : argument is of length zero > > when I am running the following codes. > >train <- c(sample(1:27,18), sample(28:54, 18), sample(55:81, 8)) >a2011.adaboost <- boosting(median_kod ~ ., data = b[train, ], >boos=TRUE, >mfinal = 10, control = rpart.control(minsplit = 0)) > >Regards, > >Greg > > [[alternative HTML version deleted]] > >______________________________________________ >R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see >https://stat.ethz.ch/mailman/listinfo/r-help >PLEASE do read the posting guide >http://www.R-project.org/posting-guide.html >and provide commented, minimal, self-contained, reproducible code. ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.