"vscode:/vscode.git/clone" did not exist on "968a353f4a0432cfb2b68b7c7df08346858d1480"
Unverified Commit 2b485ce5 authored by James Lamb's avatar James Lamb Committed by GitHub
Browse files

[R-package] remove unused code in lgb.params2str() (#4337)

parent 1b5bec00
......@@ -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()
......
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