new nrow function for xgb.DMatrix
This commit is contained in:
22
R-package/man/nrow.Rd
Normal file
22
R-package/man/nrow.Rd
Normal file
@@ -0,0 +1,22 @@
|
||||
% Generated by roxygen2 (4.1.0): do not edit by hand
|
||||
% Please edit documentation in R/nrow.xgb.DMatrix.R
|
||||
\docType{methods}
|
||||
\name{nrow,xgb.DMatrix-method}
|
||||
\alias{nrow,xgb.DMatrix-method}
|
||||
\title{\code{nrow} return the number of rows present in x.}
|
||||
\usage{
|
||||
\S4method{nrow}{xgb.DMatrix}(x)
|
||||
}
|
||||
\arguments{
|
||||
\item{x}{Object of class \code{xgb.DMatrix}}
|
||||
}
|
||||
\description{
|
||||
\code{nrow} return the number of rows present in x.
|
||||
}
|
||||
\examples{
|
||||
data(agaricus.train, package='xgboost')
|
||||
train <- agaricus.train
|
||||
dtrain <- xgb.DMatrix(train$data, label=train$label)
|
||||
stopifnot(nrow(dtrain) == nrow(train$data))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user