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

[R-package] remove support for '...' in `dim.lgb.Dataset()` (#4873)

* [R-package] remove warning about uses of '...' in dim.lgb.Dataset()

* remove '...'
parent d8274346
...@@ -949,7 +949,6 @@ lgb.Dataset.construct <- function(dataset) { ...@@ -949,7 +949,6 @@ lgb.Dataset.construct <- function(dataset) {
#' @title Dimensions of an \code{lgb.Dataset} #' @title Dimensions of an \code{lgb.Dataset}
#' @description Returns a vector of numbers of rows and of columns in an \code{lgb.Dataset}. #' @description Returns a vector of numbers of rows and of columns in an \code{lgb.Dataset}.
#' @param x Object of class \code{lgb.Dataset} #' @param x Object of class \code{lgb.Dataset}
#' @param ... other parameters (ignored)
#' #'
#' @return a vector of numbers of rows and of columns #' @return a vector of numbers of rows and of columns
#' #'
...@@ -969,17 +968,7 @@ lgb.Dataset.construct <- function(dataset) { ...@@ -969,17 +968,7 @@ lgb.Dataset.construct <- function(dataset) {
#' } #' }
#' @rdname dim #' @rdname dim
#' @export #' @export
dim.lgb.Dataset <- function(x, ...) { dim.lgb.Dataset <- function(x) {
additional_args <- list(...)
if (length(additional_args) > 0L) {
warning(paste0(
"dim.lgb.Dataset: Found the following passed through '...': "
, paste(names(additional_args), collapse = ", ")
, ". These are ignored. In future releases of lightgbm, this warning will become an error. "
, "See ?dim.lgb.Dataset for documentation on how to call this function."
))
}
if (!lgb.is.Dataset(x = x)) { if (!lgb.is.Dataset(x = x)) {
stop("dim.lgb.Dataset: input data should be an lgb.Dataset object") stop("dim.lgb.Dataset: input data should be an lgb.Dataset object")
......
...@@ -4,12 +4,10 @@ ...@@ -4,12 +4,10 @@
\alias{dim.lgb.Dataset} \alias{dim.lgb.Dataset}
\title{Dimensions of an \code{lgb.Dataset}} \title{Dimensions of an \code{lgb.Dataset}}
\usage{ \usage{
\method{dim}{lgb.Dataset}(x, ...) \method{dim}{lgb.Dataset}(x)
} }
\arguments{ \arguments{
\item{x}{Object of class \code{lgb.Dataset}} \item{x}{Object of class \code{lgb.Dataset}}
\item{...}{other parameters (ignored)}
} }
\value{ \value{
a vector of numbers of rows and of columns a vector of numbers of rows and of columns
......
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