Yin Zhu
Yin Zhu

Reputation: 17119

The internal implementation of R's dataset

I am trying to build a data processing program. Currently I use a double matrix to represent the data table, each row is an instance, each column represents a feature. I also have an extra vector as the target value for each instance, it is of double type for regression, it is of integer for classification.

I want to make it more general. I am wondering what kind of structure R uses to store a dataset, i.e. the internal implementation in R.

Upvotes: 0

Views: 828

Answers (2)

Karsten W.
Karsten W.

Reputation: 18420

Maybe if you inspect the rpy2 package, you can learn something about how data structures are represented (and can be accessed).

Upvotes: 1

DrewConway
DrewConway

Reputation: 5447

The internal data structures are `data.frame', a detailed introduction to the data frame can be found here.

http://cran.r-project.org/doc/manuals/R-intro.html#Data-frames

Upvotes: 1

Related Questions