sqlite.matrix {SQLiteDF}R Documentation

SQLite Matrix

Description

EXPERIMENTAL: Creates a SQlite Matrix (SMAT) from data frames, matrices and SQLite Data Frames.

Usage

sqlite.matrix(data, name = NULL)

Arguments

data a data frame, matrix or SQLite Data Frame
name the name of the SQLite Matrix

Details

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).

Value

A S3 object representing the SQLite Matrix.

Author(s)

Miguel A. R. Manese

See Also

sqlite.vector sqlite.data.frame

Examples

    iris.sdf <- sqlite.data.frame(iris)
    im <- sqlite.matrix(iris.sdf[,1:4])
    dim(im)   # c(150, 4)

[Package SQLiteDF version 0.1.32 Index]