[R] rename slice to avoid dplyr conflict (#10017)
This commit is contained in:
@@ -1,15 +1,12 @@
|
||||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/xgb.DMatrix.R
|
||||
\name{slice}
|
||||
\alias{slice}
|
||||
\alias{slice.xgb.DMatrix}
|
||||
\name{xgb.slice.DMatrix}
|
||||
\alias{xgb.slice.DMatrix}
|
||||
\alias{[.xgb.DMatrix}
|
||||
\title{Get a new DMatrix containing the specified rows of
|
||||
original xgb.DMatrix object}
|
||||
\usage{
|
||||
slice(object, idxset)
|
||||
|
||||
\method{slice}{xgb.DMatrix}(object, idxset)
|
||||
xgb.slice.DMatrix(object, idxset)
|
||||
|
||||
\method{[}{xgb.DMatrix}(object, idxset, colset = NULL)
|
||||
}
|
||||
@@ -28,7 +25,7 @@ original xgb.DMatrix object
|
||||
data(agaricus.train, package='xgboost')
|
||||
dtrain <- with(agaricus.train, xgb.DMatrix(data, label = label, nthread = 2))
|
||||
|
||||
dsub <- slice(dtrain, 1:42)
|
||||
dsub <- xgb.slice.DMatrix(dtrain, 1:42)
|
||||
labels1 <- getinfo(dsub, 'label')
|
||||
dsub <- dtrain[1:42, ]
|
||||
labels2 <- getinfo(dsub, 'label')
|
||||
Reference in New Issue
Block a user