Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Jun 4, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 2 additions & 19 deletions R-package/R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -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")) {
Expand All @@ -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()

Expand Down