sqlite.matrix {SQLiteDF} | R Documentation |
EXPERIMENTAL: Creates a SQlite Matrix (SMAT) from data frames, matrices and SQLite Data Frames.
sqlite.matrix(data, name = NULL)
data |
a data frame, matrix or SQLite Data Frame |
name |
the name of the SQLite Matrix |
Creates an SDF with 1 column named V1. The mode of the matrix
is determined from the data, much like as.matrix
does. It
is similar to a sqlite.vector
and has the additional attributes
sdf.dim
and sdf.dimnames
comparable to matrix
's
dim
and dimnames
attributes.
Internally, it has extra tables sdf_matrix_rownames which holds the row names (and implicitly the row count), and sdf_matrix_colnames which holds the column names (and implicitly the column count).
A S3 object representing the SQLite Matrix.
Miguel A. R. Manese
sqlite.vector
sqlite.data.frame
iris.sdf <- sqlite.data.frame(iris) im <- sqlite.matrix(iris.sdf[,1:4]) dim(im) # c(150, 4)