The R Project SVN R-packages

Rev

Rev 3509 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
3509 mrmanese 1
\name{sqlite.matrix}
2
\alias{sqlite.matrix}
3
\title{SQLite Matrix}
4
\description{
3808 mrmanese 5
EXPERIMENTAL: Creates a SQlite Matrix (SMAT) from data frames, matrices
6
and SQLite Data Frames.
3509 mrmanese 7
}
8
\usage{
9
sqlite.matrix(data, name = NULL)
10
}
11
\arguments{
3808 mrmanese 12
  \item{data}{ a data frame, matrix or SQLite Data Frame }
3509 mrmanese 13
  \item{name}{ the name of the SQLite Matrix }
14
}
15
\details{
16
Creates an SDF with 1 column named V1. The \emph{mode} of the matrix
17
is determined from the data, much like \code{as.matrix} does. It
18
is similar to a \code{sqlite.vector} and has the additional attributes
19
\code{sdf.dim} and \code{sdf.dimnames} comparable to \code{matrix}'s
20
\code{dim} and {dimnames} attributes.
21
 
22
Internally, it has extra tables \emph{sdf\_matrix\_rownames} which holds
23
the row names (and implicitly the row count), and \emph{sdf\_matrix\_colnames} 
24
which holds the column names (and implicitly the column count).
25
}
26
\value{
27
A S3 object representing the SQLite Matrix.
28
}
29
\author{Miguel A. R. Manese}
30
%\note{ }
3808 mrmanese 31
\seealso{\code{\link[SQLiteDF]{sqlite.vector}}
32
         \code{\link[SQLiteDF]{sqlite.data.frame}}}
3509 mrmanese 33
\examples{
34
    iris.sdf <- sqlite.data.frame(iris)
35
    im <- sqlite.matrix(iris.sdf[,1:4])
36
    dim(im)   # c(150, 4)
37
}
38
\keyword{data}
39
\keyword{manip}
40
\keyword{classes}