[R] Clearer function signatures for S3 methods (#9937)

This commit is contained in:
david-cortes
2023-12-31 03:45:04 +01:00
committed by GitHub
parent e40c4260ed
commit 8b9c98b65b
4 changed files with 14 additions and 23 deletions

View File

@@ -5,15 +5,13 @@
\alias{getinfo.xgb.DMatrix}
\title{Get information of an xgb.DMatrix object}
\usage{
getinfo(object, ...)
getinfo(object, name)
\method{getinfo}{xgb.DMatrix}(object, name, ...)
\method{getinfo}{xgb.DMatrix}(object, name)
}
\arguments{
\item{object}{Object of class \code{xgb.DMatrix}}
\item{...}{other parameters}
\item{name}{the name of the information field to get (see details)}
}
\description{

View File

@@ -5,15 +5,13 @@
\alias{setinfo.xgb.DMatrix}
\title{Set information of an xgb.DMatrix object}
\usage{
setinfo(object, ...)
setinfo(object, name, info)
\method{setinfo}{xgb.DMatrix}(object, name, info, ...)
\method{setinfo}{xgb.DMatrix}(object, name, info)
}
\arguments{
\item{object}{Object of class "xgb.DMatrix"}
\item{...}{Not used.}
\item{name}{the name of the field to get}
\item{info}{the specific field of information to set}

View File

@@ -7,17 +7,15 @@
\title{Get a new DMatrix containing the specified rows of
original xgb.DMatrix object}
\usage{
slice(object, ...)
slice(object, idxset)
\method{slice}{xgb.DMatrix}(object, idxset, ...)
\method{slice}{xgb.DMatrix}(object, idxset)
\method{[}{xgb.DMatrix}(object, idxset, colset = NULL)
}
\arguments{
\item{object}{Object of class "xgb.DMatrix"}
\item{...}{other parameters (currently not used)}
\item{idxset}{a integer vector of indices of rows needed}
\item{colset}{currently not used (columns subsetting is not available)}