add slice document
This commit is contained in:
24
R-package/man/slice.Rd
Normal file
24
R-package/man/slice.Rd
Normal file
@@ -0,0 +1,24 @@
|
||||
% Generated by roxygen2 (4.0.1): do not edit by hand
|
||||
\name{slice}
|
||||
\alias{slice}
|
||||
\title{Get a new DMatrix containing the specified rows of
|
||||
orginal xgb.DMatrix object}
|
||||
\usage{
|
||||
slice(object, ...)
|
||||
}
|
||||
\arguments{
|
||||
\item{object}{Object of class "xgb.DMatrix"}
|
||||
|
||||
\item{idxset}{a integer vector of indices of rows needed}
|
||||
}
|
||||
\description{
|
||||
Get a new DMatrix containing the specified rows of
|
||||
orginal xgb.DMatrix object
|
||||
}
|
||||
\examples{
|
||||
data(iris)
|
||||
iris[,5] <- as.numeric(iris[,5])
|
||||
dtrain <- xgb.DMatrix(as.matrix(iris[,1:4]), label=iris[,5])
|
||||
dsub <- slice(dtrain, c(1,2,3))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user