The R Project SVN R-packages

Rev

Rev 3251 | Rev 3282 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3251 Rev 3281
Line 1... Line 1...
1
\name{sqlite.data.frame}
1
\name{sqlite.data.frame}
2
\alias{sqlite.data.frame}
2
\alias{sqlite.data.frame}
-
 
3
\alias{sdf}
3
%- Also NEED an '\alias' for EACH other topic documented here.
4
%- Also NEED an '\alias' for EACH other topic documented here.
4
\title{ Creates an sqlite data frame from ordinary data frame.}
5
\title{SQLite Data Frame}
5
\description{
-
 
6
This function creates an sqlite data frame from the as.data.frame()-d argument.
6
\description{ Creates an sqlite data frame (SDF) from ordinary data frame.  }
7
}
-
 
8
\usage{
7
\usage{
9
sqlite.data.frame(x)
8
sqlite.data.frame(x, name=NULL)
10
}
9
}
11
%- maybe also 'usage' for other objects documented here.
-
 
12
\details{
10
\details{
13
 
11
 
14
}
12
}
15
\value{
13
\value{
16
  \item{obj}{The object to be converted into a data frame and then stored in a SQLite database.}
14
  \item{x}{The object to be converted into a data frame and then stored in a 
-
 
15
SQLite database. }
-
 
16
  \item{name}{The name of the SDF. If none is provided, a generic
-
 
17
name \emph{data}<n> is used. Names will be appended with numbers to prevent
-
 
18
duplicates. E.g. if name arg is \emph{iris}, and it already exists, then the
-
 
19
new SDF will have a name \emph{iris1}. If it still exists, then the name
-
 
20
will be \emph{iris2}, and so on.
17
}
21
}
18
\references{ ~put references to the literature/web site here ~ }
22
\references{ ~put references to the literature/web site here ~ }
19
\author{Miguel A. R. Manese}
23
\author{Miguel A. R. Manese}
20
\note{ ~~further notes~~ 
24
\note{
21
 
-
 
-
 
25
A SDF is created by creating a sqlite database, with the specified name
-
 
26
as the filename with a db extension (e.g. data1.db). Each SDF is contained in
22
 ~Make other sections like Warning with \section{Warning }{....} ~
27
a separate database. The name of the stored in the SDF.
23
}
28
}
24
\seealso{ ~~objects to See Also as \code{\link{help}}, ~~~ }
29
\seealso{ ~~objects to See Also as \code{\link{help}}, ~~~ }
25
\examples{
30
\examples{
26
    iris.sdf <- sqlite.data.frame(iris)
31
    iris.sdf <- sqlite.data.frame(iris)
27
    #names(iris.sdf)
32
    names(iris.sdf)
-
 
33
    class(iris.sdf)
-
 
34
    iris.sdf\$Petal.Length[1:10]
-
 
35
    iris.sdf[["Petal.Length"]][1:10]
-
 
36
    iris.sdf[1,c(T,F)]
28
    #apply(iris.sdf[1:4], 2, mean)
37
    #apply(iris.sdf[1:4], 2, mean)
29
 
-
 
30
}
38
}