Unverified Commit 8967debe authored by James Lamb's avatar James Lamb Committed by GitHub
Browse files

[R-package] remove unused internal variables (#5991)

parent 9a84b61d
...@@ -494,11 +494,10 @@ Dataset <- R6::R6Class( ...@@ -494,11 +494,10 @@ Dataset <- R6::R6Class(
if (info_len > 0L) { if (info_len > 0L) {
# Get back fields # Get back fields
ret <- NULL if (field_name == "group") {
ret <- if (field_name == "group") { ret <- integer(info_len)
integer(info_len)
} else { } else {
numeric(info_len) ret <- numeric(info_len)
} }
.Call( .Call(
......
...@@ -98,8 +98,6 @@ Predictor <- R6::R6Class( ...@@ -98,8 +98,6 @@ Predictor <- R6::R6Class(
start_iteration <- 0L start_iteration <- 0L
} }
num_row <- 0L
# Check if data is a file name and not a matrix # Check if data is a file name and not a matrix
if (identical(class(data), "character") && length(data) == 1L) { if (identical(class(data), "character") && length(data) == 1L) {
......
...@@ -116,10 +116,6 @@ lgb.convert_with_rules <- function(data, rules = NULL) { ...@@ -116,10 +116,6 @@ lgb.convert_with_rules <- function(data, rules = NULL) {
column_classes <- .get_column_classes(df = data) column_classes <- .get_column_classes(df = data)
is_char <- which(column_classes == "character")
is_factor <- which(column_classes == "factor")
is_logical <- which(column_classes == "logical")
is_data_table <- data.table::is.data.table(x = data) is_data_table <- data.table::is.data.table(x = data)
is_data_frame <- is.data.frame(data) is_data_frame <- is.data.frame(data)
......
...@@ -225,8 +225,6 @@ lgb.cv <- function(params = list() ...@@ -225,8 +225,6 @@ lgb.cv <- function(params = list()
stop(sQuote("folds"), " must be a list with 2 or more elements that are vectors of indices for each CV-fold") stop(sQuote("folds"), " must be a list with 2 or more elements that are vectors of indices for each CV-fold")
} }
nfold <- length(folds)
} else { } else {
if (nfold <= 1L) { if (nfold <= 1L) {
......
...@@ -1341,7 +1341,7 @@ test_that("Booster's print, show, and summary work correctly", { ...@@ -1341,7 +1341,7 @@ test_that("Booster's print, show, and summary work correctly", {
.has_expected_content_for_fitted_model(log_txt) .has_expected_content_for_fitted_model(log_txt)
# summary() # summary()
log_text <- capture.output({ log_txt <- capture.output({
ret <- summary(model) ret <- summary(model)
}) })
.have_same_handle(ret, model) .have_same_handle(ret, model)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment