From 619ecef87b3dce7a8cf78e6eb9ca06608ea4bd0e Mon Sep 17 00:00:00 2001 From: James Lamb Date: Thu, 3 Jun 2021 23:23:01 -0500 Subject: [PATCH] [R-package] remove unused code in lgb.params2str() --- R-package/R/utils.R | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/R-package/R/utils.R b/R-package/R/utils.R index 9d332e75ae60..313bb9bf57be 100644 --- a/R-package/R/utils.R +++ b/R-package/R/utils.R @@ -24,7 +24,8 @@ lgb.last_error <- function() { stop("api error: ", err_msg) return(invisible(NULL)) } -lgb.params2str <- function(params, ...) { + +lgb.params2str <- function(params) { # Check for a list as input if (!identical(class(params), "list")) { @@ -34,24 +35,6 @@ lgb.params2str <- function(params, ...) { # Split parameter names names(params) <- gsub("\\.", "_", names(params)) - # Merge parameters from the params and the dots-expansion - dot_params <- list(...) - names(dot_params) <- gsub("\\.", "_", names(dot_params)) - - # Check for identical parameters - if (length(intersect(names(params), names(dot_params))) > 0L) { - stop( - "Same parameters in " - , sQuote("params") - , " and in the call are not allowed. Please check your " - , sQuote("params") - , " list" - ) - } - - # Merge parameters - params <- c(params, dot_params) - # Setup temporary variable ret <- list()