[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

@@ -611,7 +611,7 @@ cb.cv.predict <- function(save_models = FALSE) {
#' matplot(xgb.gblinear.history(bst, class_index = 0)[[1]], type = 'l')
#'
#' @export
cb.gblinear.history <- function(sparse=FALSE) {
cb.gblinear.history <- function(sparse = FALSE) {
coefs <- NULL
init <- function(env) {

View File

@@ -629,7 +629,7 @@ xgb.attributes <- function(object) {
#' @export
xgb.config <- function(object) {
handle <- xgb.get.handle(object)
.Call(XGBoosterSaveJsonConfig_R, handle);
.Call(XGBoosterSaveJsonConfig_R, handle)
}
#' @rdname xgb.config

View File

@@ -119,10 +119,10 @@
#' print(cv, verbose=TRUE)
#'
#' @export
xgb.cv <- function(params=list(), data, nrounds, nfold, label = NULL, missing = NA,
prediction = FALSE, showsd = TRUE, metrics=list(),
xgb.cv <- function(params = list(), data, nrounds, nfold, label = NULL, missing = NA,
prediction = FALSE, showsd = TRUE, metrics = list(),
obj = NULL, feval = NULL, stratified = TRUE, folds = NULL, train_folds = NULL,
verbose = TRUE, print_every_n=1L,
verbose = TRUE, print_every_n = 1L,
early_stopping_rounds = NULL, maximize = NULL, callbacks = list(), ...) {
check.deprecation(...)

View File

@@ -38,7 +38,7 @@
#' cat(xgb.dump(bst, with_stats = TRUE, dump_format='json'))
#'
#' @export
xgb.dump <- function(model, fname = NULL, fmap = "", with_stats=FALSE,
xgb.dump <- function(model, fname = NULL, fmap = "", with_stats = FALSE,
dump_format = c("text", "json"), ...) {
check.deprecation(...)
dump_format <- match.arg(dump_format)