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] Accept data frames as inputs #4207

Closed
Closed
Changes from 1 commit
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
Prev Previous commit
Next Next commit
revert corrections
  • Loading branch information
david-cortes committed Apr 21, 2021
commit 9fb2ffa2a78899d0c93c6cb1b53718b1ba49c307
4 changes: 2 additions & 2 deletions R-package/R/lgb.Dataset.R
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ Dataset <- R6::R6Class(
cnames <- colnames(private$raw_data)
}

# set feature names if they don't exist
# set feature names if they not exist
if (is.null(private$colnames) && !is.null(cnames)) {
private$colnames <- as.character(cnames)
}
Expand Down Expand Up @@ -287,7 +287,7 @@ Dataset <- R6::R6Class(
)

} else if (methods::is(private$raw_data, "dgCMatrix")) {
if (length(private$raw_data@p) > .Machine$integer.max) {
if (length(private$raw_data@p) > 2147483647L) {
stop("Cannot support large CSC matrix")
}
# Are we using a dgCMatrix (sparsed matrix column compressed)
Expand Down