[R] What exactly is an dgCMatrix-class. There are so many attributes.

C W tmrsg11 at gmail.com
Fri Oct 20 20:11:22 CEST 2017


Dear R list,

I came across dgCMatrix. I believe this class is associated with sparse
matrix.

I see there are 8 attributes to train$data, I am confused why are there so
many, some are vectors, what do they do?

Here's the R code:

library(xgboost)
data(agaricus.train, package='xgboost')
data(agaricus.test, package='xgboost')
train <- agaricus.train
test <- agaricus.test
attributes(train$data)

Where is the data, is it in $p, $i, or $x?

Thank you very much!

	[[alternative HTML version deleted]]



More information about the R-help mailing list