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) {
#' @title Dimensions of 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 ... other parameters (ignored)
#'
#' @return a vector of numbers of rows and of columns
#'
......@@ -969,17 +968,7 @@ lgb.Dataset.construct <- function(dataset) {
#' }
#' @rdname dim
#' @export
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."
))
}
dim.lgb.Dataset <- function(x) {
if (!lgb.is.Dataset(x = x)) {
stop("dim.lgb.Dataset: input data should be an lgb.Dataset object")
......
......@@ -4,12 +4,10 @@
\alias{dim.lgb.Dataset}
\title{Dimensions of an \code{lgb.Dataset}}
\usage{
\method{dim}{lgb.Dataset}(x, ...)
\method{dim}{lgb.Dataset}(x)
}
\arguments{
\item{x}{Object of class \code{lgb.Dataset}}
\item{...}{other parameters (ignored)}
}
\value{
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