* [CI] Move lint to a separate script * [CI] Improved lintr launcher * Add lintr as a separate action * Add custom parsing logic to print out logs * Fix lintr issues in demos * Run R demos * Fix CRAN checks * Install XGBoost into R env before running lintr * Install devtools (needed to run demos)
7 lines
238 B
R
7 lines
238 B
R
data(mtcars)
|
|
head(mtcars)
|
|
bst <- xgboost(data = as.matrix(mtcars[, -11]), label = mtcars[, 11],
|
|
objective = 'count:poisson', nrounds = 5)
|
|
pred <- predict(bst, as.matrix(mtcars[, -11]))
|
|
sqrt(mean((pred - mtcars[, 11]) ^ 2))
|