[R] address some lintr warnings (#8609)

This commit is contained in:
James Lamb
2022-12-17 04:36:14 -06:00
committed by GitHub
parent 53e6e32718
commit 17ce1f26c8
18 changed files with 137 additions and 116 deletions

View File

@@ -404,7 +404,7 @@ test_that("Configuration works", {
config <- xgb.config(bst)
xgb.config(bst) <- config
reloaded_config <- xgb.config(bst)
expect_equal(config, reloaded_config);
expect_equal(config, reloaded_config)
})
test_that("strict_shape works", {

View File

@@ -53,7 +53,7 @@ test_that("xgb.DMatrix: saving, loading", {
dtrain <- xgb.DMatrix(tmp_file)
expect_equal(colnames(dtrain), cnames)
ft <- rep(c("c", "q"), each=length(cnames)/2)
ft <- rep(c("c", "q"), each = length(cnames) / 2)
setinfo(dtrain, "feature_type", ft)
expect_equal(ft, getinfo(dtrain, "feature_type"))
})

View File

@@ -440,7 +440,7 @@ test_that("xgb.plot.shap.summary works", {
})
test_that("check.deprecation works", {
ttt <- function(a = NNULL, DUMMY=NULL, ...) {
ttt <- function(a = NNULL, DUMMY = NULL, ...) {
check.deprecation(...)
as.list((environment()))
}